Question

Error Account does not exist OAU-222 using Postman to get token

  • 28 October 2023
  • 6 replies
  • 253 views

We have set up credentials in the sandbox to get a token, We prefer to test with Postman. We are receiving the error "OAU-222 Account does not exist". We verified the authorization header is correctly set to Basic + base64_encoded( Client ID + ":" + Client Secret ).

We saw another post indicating Authorization and Content-type should be passed in the body of the post, not as headers. When we tried that we got a different error. Any help woudl be greatly appreciated. We downloaded the sample Postman collection, but it seems to be out of date and does not match the JWT Authorization Code Flow as described in the documentation.


6 replies

Userlevel 1

Where did you find that in the other post indicating that the Authorization and Content type should be passed in the body? It was clearly written in the answer with the code that the grant_type and the assertion must be in the body. The developer who asked that question put them in the query path.

This must be the body params of the POST, not the query params

  1. {
  2. grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',
  3. assertion: JWT,
  4. }

Hello Phong, thank you for answering. I can't find the other question at this time, but you were the person who responded as well, stating the grant type and assertion should be placed in the body. I believe the confusion stems from this documentation page, where these items are listed under a heading "Parameter"

https://developers.ringcentral.com/guide/authentication/jwt-flow

After re-testing with these items in the POST body, I receive this error. Do you have any advice? Thanks.


"error" : "invalid_request",

"errors" : [ {

"errorCode" : "OAU-250",

"message" : "Unsupported grant type"

} ],

"error_description" : "Unsupported grant type"

}


Userlevel 1

Again, you read the document incorrectly. It is under the POST Body section.

screen-shot-2023-10-30-at-93607-pm.png

What is your app client id?

Yes, I was agreeing with you, I read it incorrectly. My client ID is:

asfN2CbtwvHflRyDWUPCk9


Userlevel 1

Thanks for sharing the app client id. Your app grant type is correctly set for JWT.

So the problem is purely with your Postman /auth call.

Check if you have access to this Postman collection

https://www.postman.com/ringcentral1/workspace/ringcentral-platform-public-test

Thank you very much for that Postman collection! I retested and it worked.

Reply