Dave MacLean avatar image
Dave MacLean asked Dave MacLean commented

OAU-251 password flow issue

I have a password flow for a REST API application. It is set to private so password flow can be used. We are getting the error:

"errorCode" : "OAU-251",

"message" : "Unauthorized for this grant type"

There is no longer a platform question when building an app.

Our grant type is grant_type=password&username={1}&extension=101password={2}

{1}= urlEncode(number) and {2}= urlEncode(password)

& our authorization header is 'Basic ' + $Basic which is a base64 encode of the client_ID:clientSecret

I have tried the username and passwords as just strings with no urlEncode. I have tried removing the +. I have changed the headers & double checked the clientID and client secret of the sandbox as many times as possible. I have followed almost all of the questions the forum has to offer.

Any ideas how to fix this?

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 Dave MacLean commented

Seriously you posted the username and full password in public forum? I masked the password now!

There must be a mistake some where in your code. What language are you writing and can you share the code. Any reason why you are not using any RingCentral SDK? At least for double check if your app is setup properly.

1 comment
1 |3000

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

That information was old and not viable anymore but I will cover up the rest. Thanks. We are just going to have to upgrade our auth method. Thanks for your response.

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