question

tayyab-sajjad avatar image
tayyab-sajjad asked ·

Authorize API with Web Application Failed

I am trying to connect my web app to ringcentral for sending Fax but i am unable to authorize my application to ringcentral.When i am trying to run sample GIT  folder it is giving unauthorized error.
Test 1: authData.php Auth exception: Refresh token has expired Exception: Unauthorized for this grant type SDK HTTP Error at https://platform.devtest.ringcentral.com/restapi/oauth/token Response text: { "error" : "unauthorized_client", "error_description" : "Unauthorized for this grant type", "errors" : [ { "errorCode" : "OAU-251", "message" : "Unauthorized for this grant type" } ] } Previous: Response has unsuccessful status


#Windows #PHP 


topic-default
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.

Tyler Liu avatar image
Tyler Liu answered ·
The key message is "Unauthorized for this grant type".

Please check your app to make sure it supports the grant type.

Ref: https://github.com/ringcentral/ringcentral-php/issues/39#issuecomment-242907546 
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.

tayyab-sajjad avatar image
tayyab-sajjad answered ·
See it is not showing the password flow option..... Please help me 

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.

Tyler Liu avatar image
Tyler Liu answered ·
If it's a sandbox app, you can simply create a new app instead to enable password flow.

By the way, public app doesn't support password flow.

If you have difficulty configuring it, please contact devsupport@ringcentral.com
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.

tayyab-sajjad avatar image
tayyab-sajjad answered ·
Can you help me how to resolve this ?


1 comment 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.

I am a developer support and I am not good at the issue you encountered. Please contact customer support instead:  https://success.ringcentral.com/  Thank you.
0 Likes 0 · ·
Anirban Sen Chowdhary avatar image
Anirban Sen Chowdhary answered ·

This a common issue user face. Similar type of question raised here.

More precisely discussed here.

If you're using an OAuth 2.0 request using the OAuth 2.0 password grant (grant_type=password), then your application you created should in the RingCentral Developer Portal should be Password flow .

Please note, application created with different platform type will have different grant_type.

For example, application created for platform type = browser based will have grant_type=Authorization Code | Implicit | Refresh Access Token where as application for platform type = Desktop/Windows will have grant_type= Authorization Code | Password flow |Refresh Access Token

So in order to use (grant_type=password) you need to have application created with platform type that support Password flow

Here is wonderful way it has answered with animated Gif image that will easily help you to understand the proccess: https://stackoverflow.com/questions/47692828/ringcentral-auth-token-failed-in-curl-call-unauthorized-for-this-grant-type/47745436#47745436

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.

Rahul G avatar image
Rahul G answered ·
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.

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.