question

sravani kandarpa avatar image
sravani kandarpa asked ·

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

authenticationpassword flowoau-140postmanpassword flow postman
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.

Anirban Sen Chowdhary avatar image
Anirban Sen Chowdhary 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

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.

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


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.