question

evgeny-alhovik5405 avatar image
evgeny-alhovik5405 asked ·

Cannot authorize with RingCentral C# Client


Cannot authorize via C# Client

sample code below:

 rc = new RestClient(Config.Instance.appKey, Config.Instance.appSecret, false);
 var result = rc.Authorize(Config.Instance.username, Config.Instance.extension, Config.Instance.password).Result;

The error is "Request to https://platform.devtest.ringcentral.com/restapi/oauth/token failed with status code 400 (Bad Request)."


In case I try to use C# SDK, I always get following response error:


{
  "error" : "invalid_grant",
  "error_description" : "Invalid resource owner credentials."
}

aaa
1 |1000 characters needed characters left characters exceeded

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

1 Answer

· Write an Answer
Tyler Liu avatar image
Tyler Liu answered ·
Please check the password. The error message means your password is invalid.
6 comments Share
1 |1000 characters needed characters left characters exceeded

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

There are two types of accounts for development:

Production credentials - this is used for production use 


Sandbox (test) credentials - this is for the test environment


When you are accessing anything with "devtest" in the domain, you should use your Sandbox credentials which are provided in the Developer Portal under the Credentials tab as mentioned by Tyler

1 Like 1 · ·
I just tried an invalid password and I got the same error message.
0 Likes 0 · ·
Am I right to say that same password used to login to  https://developer.ringcentral.com ? I can log in there with my password. Even I can send sms via  API Explorer 



0 Likes 0 · ·
One more error message I get when I use C# Client 
{
  "error": "invalid_client",
  "errors": [
    {
      "errorCode": "OAU-153",
      "message": "Invalid client: ",
      "parameters": [
        {
          "parameterName": "client_id",
          "parameterValue": ""
        }
      ]
    }
  ],
  "error_description": "Invalid client: "
}
0 Likes 0 · ·
There are two kinds of RingCentral apps: private and public.

Please double check. Is your app public or private? If it's private, only certain users can login. It might be the root cause of the problem.


0 Likes 0 · ·
Show more comments

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.