Question

503 Service Temporarily Unavailable with my oauth key curl,I get a 503 error trying to get the oauth token

  • 17 July 2021
  • 4 replies
  • 1262 views

For the whole day (July 16 2021) every time I run the command in curl to get the oauth token, I get a 503 Service Temporarily Unavailable error.

Even when I try to just copy and paste the url http://service.devtest.ringcentral.com/restapi/oauth/token in my browser, I get the error.

Is anyone else having this issue? If not, what am I dong wrong?

Im using this command:

curl -i -X POST "https://platform.devtest.ringcentral.com/restapi/oauth/token"; 
-H "Accept: application/json" 
-H "Content-Type: application/x-www-form-urlencoded" 
-u "<my app key info>:<my secret info>" 
-d "devPhoneNum&password=secretPassword&extension=101&grant_type=password"

4 replies

Userlevel 1

It is completely wrong on these 2 lines

-u "<my app key info>:<my secret info>" 
-d "devPhoneNum&password=secretPassword&extension=101&grant_type=password"

Look at the example

POST https://platform.devtest.ringcentral.com/restapi/oauth/token
Accept: application/json 
Content-Type: application/x-www-form-urlencoded 
Authorization: Basic cmVsLWFsbC1wZXJtaXNzaWXFjMmpRZmlQcnlkSUkweE92QQ==
grant_type=password&username=18559100010&extension=101&password=121212

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

There are so many threads available on this topic in the community with examples and commands.

Example : https://community.ringcentral.com/questions/884/curl-restapioauthtoken-errorcode-oau-251-message-u.html

the examples I followed the docs and what Ive seen from here in the forums. In fact, I copy and pasted the curl command from a few forum posts, and its how I started to get the 503 error.

Right now, I'm not sure where Im going wrong. I think I'm supplying the mandatory params via CURL, but obviously something is not right.


I've seen those examples, and how I got my curl command to use. my results are different and Im not sure why. What do you see that Im missing, because I copy and pasted the curl commands others used and Im not getting the same results.

My settings now has the green check mark for "passwords" but auth codes has a red X.
Maybe I need to make a new app and try again? OR maybe Im using the wrong stuff for the settings in my app?

Reply