question

steve-thomas3166 avatar image
steve-thomas3166 asked ak answered

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
phpauth
1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

jerry-white5852 avatar image
jerry-white5852 answered
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?


1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

ak avatar image
ak answered

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

1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.