question

benjamin-dean avatar image
benjamin-dean asked Byrne Reese edited

Receiving a CMN-211 / HTTP 503 obtaining an OAuth token from DevTest environment

When I tried to obtain an access_token from the DevTest/sandbox environment I received a HTTP 503 response / CMN-211 response instead of the expected access_token and a 200 response for the following request:


POST /restapi/v1.0/oauth/token

HOST: https://platform.devtest.ringcentral.com

HTTP Headers:

  • Content-Type: application/x-www-form-urlencoded;charset=UTF-8
  • Authorization: Basic <BASE64_ENCODED_API_KEYS>
  • Accept: application/json

POST Body:

grant_type=password&username=<RC_USERNAME>&password=<RC_PASSWORD>&extension=<RC_EXTENSION>


NOTE: I did replace the values in tags above with actual values

The response I received was:

{ 
  "errorCode": "MaintenanceMode",
  "message": "Service is overloaded, please retry later",
  "errors": [
    {
      "errorCode": "CMN-211",
      "message": "Service is overloaded, please retry later"
    }
  ]
}

Is the devtest environment in Maintenance mode, or am I doing something incorrectly?

apierrorsoauthaccess_tokencmn-211
1 |1500 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.

benjamin-dean avatar image
benjamin-dean answered
Figured out what the problem is. The RingCentral OAuth route does not utilize the version string in the path.

The path I was providing was invalid according to all the documentation in RingCentral. 

If I remove the "/v1.0" from the PATH being used, then I receive a HTTP 200 response and the expected access_token.

Sharing this in case other developers experience this as well and to help save them some time.
1 |1500 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 avatar image
Anirban answered

Yes, the correct url contains /restapi/oauth/token and not any version v1.0

If you check the document here https://developers.ringcentral.com/guide/authentication/password-flow

You will find the correct way of calling it

1 |1500 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.

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