question

Umair Arshad avatar image
Umair Arshad asked Umair Arshad commented

Finding URL to Request authorization code

I am following this tutorial on creating an app:

https://developers.ringcentral.com/guide/messaging/quick-start#c#


I went into visual studio following the instructions and got the Ring Central API. When I ran the code from the tutorial after filling the fields, I got the following error:

Content: {

"error" : "unauthorized_client",

"errors" : [ {

"errorCode" : "OAU-251",

"message" : "Unauthorized for this grant type"

} ],

"error_description" : "Unauthorized for this grant type"

}


Going through the forums "Unauthorized for this grant type" errors can supposedly be solved by getting 3-legged authentication. Which got me to this page:

https://developers.ringcentral.com/guide/authentication/auth-code-flow


In step 1 I don't understand how I'm meant to generate the URL. Is it copy and pasted from a specific ring central link related to my app? When I look at my sandbox app, the url is generic (https://platform.devtest.ringcentral.com/) and doesn't lead to anywhere. Also if you have any advice to making apps in Ring Central, it would be appreciated.

authentication
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

Phong Vu avatar image
Phong Vu answered Umair Arshad commented

What is your app client id? Or is your app type a password flow authentication or OAuth authorization?

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

Umair Arshad avatar image Umair Arshad commented ·

I do have a client ID (CMnL47khQVSZOOfUT1i76 for sandbox app).

On reflection, my app is not web based or browser based (it is run in visual studio), so it's not OAuth. Not sure what I need to do to authorize my app now.

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Umair Arshad commented ·

I can't find your app with the client id you provided.

Anyway, if it is a password flow type, just provide the login credentials (username and password) of one of the user in your sandbox.

1 Like 1 ·
Umair Arshad avatar image Umair Arshad Phong Vu ♦♦ commented ·

Oh sorry, it was CMnL47khQVSZOOfUT1i76Q

0 Likes 0 ·

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