question

sravani kandarpa avatar image
sravani kandarpa asked ARULJOTHY S answered

"Invalid resource owner credentials" for Password Flow via Postman

I have an app with Platform type as "Password Flow: and "Refresh Token" . I am using postman to access token and I get below error.

{
  "error": "invalid_grant",
  "error_description": "Invalid resource owner credentials",
  "errors": [
    {"errorCode": "OAU-140","message": "Invalid resource owner credentials"}
  ]
}

Below is what I have tried:

  1. https://platform.devtest.ringcentral.com/restapi/oauth/token? along with parameters - username, password, extension and grant_type=password.
  2. Auth - Auth Basic used username = Client_id and password =Client Secret.

I do see authentication is added in header.

I have tested auth using the link below, using the same parameters and client id/secret.

http://ringcentral.github.io/api-explorer/#!/Authentication/oauth_token_post

Could you please help me in fixing the error.

Kindly let me know if I am using incorrect method.

Thank you.

authenticationoauth
1 |3000

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

Anirban avatar image
Anirban answered

First of all you need to keep in mind that in body, we need to pass the parameters in following way :

username=<account phone number>&password=<account password>&extension=<your extension>&grant_type=refresh_token&refresh_token=<the refresh token generated>

username should be the phone number


In header part

"Authorization",:"Basic <ClientID:ClientSecret in base 64> 

You need to convert ClientID and ClientSecret into base64.

Remaining all seems fine.

Make sure you have done the same

1 |3000

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

ARULJOTHY S avatar image
ARULJOTHY S answered

This occurs due to invalid username or password please check it properly..in my case I'm faced this issue too...im sharing the screenshot here


1 |3000

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

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