CAMARA - Number Verification - France

FREEMIUM
Country
France
От Orange | Обновлено एक वर्ष पहले | Connectivity & Networks
Назад ко всем обсуждениям

Getting Authentication error while calling the Orange Number Verification service

Rapid account: Channel Partner User
ChannelPartnerUser
एक वर्ष पहले

We are implementing the Orange Number Verification API. For this, we need to call an Orange service. This service has Bearer type authentication (Oauth2). I am able to get access token successfully and access token validity is 90 days. By using latest access token, I tried to call an Orange service by sending the access token in header but getting unauthorized access error every time.

curl -X POST 
-H "Authorization: Basic NktSSHljksdj7P...Jjndb6UdnlrT2lOaA==" 
-d "grant_type=authorization_code
&code=OFR-908cb0277a7e3d358c39d0792750875e...f4139a840cdcb6e
&redirect_uri=https%3F%2F%2Fwww.myserver.com" 
https://api.orange.com/openidconnect/fr/v1/token 
Rapid account: Enterpriseadminuser
enterpriseadminuser commented एक वर्ष पहले

Can you try to change quote ’ to "? Like this:

$requestArray = [
    'name' => 'User',
    'age'  => 100
];

'header'  => "Content-type: application/x-www-form-urlencoded\r\n" .
             "Authorization: Bearer xxxxxxxxxxxxxxxxx\r\n",
'content' => http_build_query($requestArray)
Because \r\n doesn't work inside one quote ', it sends 'as is'

Присоединяйтесь к обсуждению – добавьте комментарий ниже:

Войдите / Зарегистрируйтесь, чтобы публиковать новые комментарии