question

George Schally avatar image
George Schally asked George Schally answered

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

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.

authenticationget token
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

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. }
1 |3000

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

George Schally avatar image
George Schally answered Phong Vu commented

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"

}


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.

Phong Vu avatar image Phong Vu ♦♦ commented ·

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?

0 Likes 0 ·
George Schally avatar image
George Schally answered Phong Vu commented

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

asfN2CbtwvHflRyDWUPCk9


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.

Phong Vu avatar image Phong Vu ♦♦ commented ·

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

0 Likes 0 ·
George Schally avatar image
George Schally answered

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

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