News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
OAU-251 - "Unauthorized for this grant type"
Tags: api sms
Sep 7, 2021 at 7:45am   •   2 replies  •  0 likes
Andy Miscuk

Apologies, I am perplexed. Has something changed with how API calls are handled in the past year. I had code that was working but now I get the above error. Has there been a URL change or perhaps formatting? I am using "3-legged OAuth flow authorization code" Thanks, Andy

2 Answers
answered on Sep 7, 2021 at 9:06am  

Private windows desktop


 0
on Sep 7, 2021 at 10:01am   •  0 likes

The change for that platform type is that it will no longer support password flow. However, you said that you have problem to login with 3-legged OAuth and you app is an old app? Please confirm and give me your app client id so I can check for you.

on Sep 14, 2021 at 3:10pm   •  0 likes

@Phong Vu , have you had a chance to review this?

Thanks,

Andy

on Sep 14, 2021 at 4:07pm   •  0 likes

Review what? See my instructions in the previous comment and make your choice.

on Sep 15, 2021 at 1:17pm   •  0 likes

Apologies, I did not see your reply on the 13th(?) . I have never used a OAuth redirect URI before and my code worked previously, is this a somewhat new requirement?

on Sep 15, 2021 at 1:28pm   •  0 likes

You are conflicting yourself. In your first question you wrote "I am using "3-legged OAuth flow authorization code", now you wrote "I have never used a OAuth redirect URI before and my code worked previously".

Looks like you only need the password flow authentication. So just create a new app with platform type "Server only-No UI"

on Sep 16, 2021 at 6:09am   •  0 likes

"3-legged OAuth flow authorization code" is based on the account information. and it is true "I have never used a OAuth redirect URI before and my code worked previously". its not in my code, any where. Was I using something different before? The steps in my code were:


Here are the steps I would take.


I would get a Get a bearer token

I would base64encode the Appkey and the AppSecretkey

That would go in the "Authorization" of the request header

the body of the request would have User name extension and passsword.

The response would contain the bearer token.

The bearer token would go into a request to


https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/sms


To send a text message.


Does that bring any clarity to what method i am using?


Thank you for any help you can provide.

on Sep 16, 2021 at 7:25am   •  0 likes

Follow the quick start steps to create a new app and choose the language you like to copy/paste and run it

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

on Sep 10, 2021 at 2:34pm   •  0 likes

Thank you!

on Sep 10, 2021 at 2:33pm   •  0 likes

p24OBV_bS0-6r1mi9kmTLQ

on Sep 13, 2021 at 7:16am   •  0 likes

Your app was created on Sep 6, and it is a Desktop/Windows platform type which allows only 3-legged authorization flow. However, you have not specified the OAuth redirect URI for your app so I don't think that you could ever login your app with 3-legged authorization flow.

If you really need 3-legged authorization flow, specify the redirect URI and implement your app to handle the authorization code accordingly. https://developers.ringcentral.com/guide/authentication/auth-code-flow

If you just want to have password flow, create a new app with Server-only platform type. Or let me know so I can help change your current app platform type. https://developers.ringcentral.com/guide/authentication/password-flow

answered on Sep 7, 2021 at 9:03am  

What is your app platform type? Check this old thread to see how to change/fix your issue.


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us