question

evgeny-alhovik5405 avatar image
evgeny-alhovik5405 asked John Wang Deactivated commented

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."

}


sdk
1 |3000

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

1 Answer

Tyler Liu avatar image
Tyler Liu answered John Wang Deactivated commented
Please check the password. The error message means your password is invalid.
6 comments
1 |3000

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

John Wang avatar image John Wang ♦♦ commented ·
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 ·
Tyler Liu avatar image Tyler Liu ♦ commented ·
I just tried an invalid password and I got the same error message.
0 Likes 0 ·
e-z-u-r-s-dot-com5406 avatar image e-z-u-r-s-dot-com5406 commented ·
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 ·
e-z-u-r-s-dot-com5406 avatar image e-z-u-r-s-dot-com5406 commented ·
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 ·
Tyler Liu avatar image Tyler Liu ♦ commented ·
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

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys