Skip to main content
New Participant
Sep 22, 2016 1:33 PM UTC
Question

after successfully authenticated with api, i am getting error code CMN-102

Hi,


Last 3 days, i am trying to access call logs from api using sandbox credentials but getting errors.

I get error of Invalid Authorization header when i am trying to access from PHP curl query.

Even i successfully authenticated with apis and get access token.

$headers = array( 'Accept: application/json',

'Authorization: Bearer' . $_SESSION['access_token']

);

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$url='https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/call-log';

Kindly tell me how to get call logs from api using PHP curl script



Thanks,

Ajay Gupta

12 replies

Participating Frequently
Jun 22, 2017 3:59 PM UTC
Hello 

Need your help we are in production
according to dashboard => credentials section,
we have just changed sandbox credentials with production credentials  in above code and getting Invalid resource owner credentials.

output is 

{ "error" : "invalid_grant", "error_description" : "Invalid resource owner credentials", "errors" : [ { "errorCode" : "OAU-140", "message" : "Invalid resource owner credentials" } ] }
Uh oh, that did not work the way we expected.

What could be the reason for that or what should i need to change?


The First Step
Jun 22, 2017 6:34 PM UTC

You would need to use the appKey and appSecret for the PROD Environment also, you would need to use the Production Credentials. 

Meanwhile, could you confirm if the server URL for PROD Environment is: https://platform.ringcentral.com