question

Umair Arshad avatar image
Umair Arshad asked ·

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.

authorization
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
Phong Vu avatar image
Phong Vu answered ·

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

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

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 ·

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 ·

Oh sorry, it was CMnL47khQVSZOOfUT1i76Q

0 Likes 0 ·

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.