question

Andy Miscuk avatar image
Andy Miscuk asked Phong Vu commented

OAU-251 - "Unauthorized for this grant type"

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

rest api
1 |3000

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

Phong Vu avatar image
Phong Vu answered

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

1 |3000

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

Andy Miscuk avatar image
Andy Miscuk answered Phong Vu commented

Private windows desktop

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

Phong Vu avatar image Phong Vu ♦♦ commented ·

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.

0 Likes 0 ·
Andy Miscuk avatar image Andy Miscuk Phong Vu ♦♦ commented ·

p24OBV_bS0-6r1mi9kmTLQ

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Andy Miscuk commented ·

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

0 Likes 0 ·
Andy Miscuk avatar image Andy Miscuk Phong Vu ♦♦ commented ·

Thank you!

0 Likes 0 ·
Andy Miscuk avatar image Andy Miscuk Phong Vu ♦♦ commented ·

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

Thanks,

Andy

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Andy Miscuk commented ·

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

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