question

Kevin Morris avatar image
Kevin Morris asked Kevin Morris commented

Can't get token

I post this:

https://platform.devtest.ringcentral.com/restapi/oauth/token

and I get this:

{

"errorCode": "AGW-404",

"message": "Resource not found",

"errors": []

}

What am I doing wrong?

(Note: I'm using both the "Try It" button in the RingCentral instructional webpage, as well as the "Postman" app. Both give the same result.

authentication
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 Kevin Morris commented

What is the request header and the body of your request? You can read this dev guide to learn more about RingCentral authentication.

7 comments
1 |3000

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

Kevin Morris avatar image Kevin Morris commented ·

Here are the images of Postman.

0 Likes 0 ·
image-01.jpg (152.0 KiB)
Kevin Morris avatar image Kevin Morris commented ·

Image 2

0 Likes 0 ·
image-02.jpg (170.7 KiB)
Kevin Morris avatar image Kevin Morris commented ·

Image 3

0 Likes 0 ·
image-03.jpg (143.2 KiB)
Kevin Morris avatar image Kevin Morris commented ·

In Postman, I changed the GET to POST. I now get a different response. The REST server is not recognizing my user creds, even tho I'm logged into the RingCentral dev site, using those same creds. I tried both with, and without the + character in front of the phone number. I tried escaping the plus character to a %2B. Always the same result.

{

"error": "invalid_client",

"errors": [

{

"errorCode": "OAU-153",

"message": "Invalid client: [my dev phone number]",

"parameters": [

{

"parameterName": "client_id",

"parameterValue": "[my dev phone number]"

}

]

}

],

"error_description": "Invalid client: 14242591964"

}

0 Likes 0 ·
Kevin Morris avatar image Kevin Morris commented ·

Test.

-1 Like -1 ·
Show more comments
Kevin Morris avatar image
Kevin Morris answered

This is a major frustration I have with this site. I review the documents, see all the info, but I'm not understanding where I'm supposed to enter all these parameters, authorizations, body. I tried generating an app, to see if I could review the source code for clues, but, when I generate the app, I can't find where to view the source code. When I try out the API with the "Try it" button, it fails, unknown reason. I'm using both the RingCentral API "Try It" as well as Postman to try to simplify what I am doing. I get nothing but a "Resource not found" error message no matter what my setting are. So I post a question, and the response is always something like "Refer to the documentation". (Which I tried, can't get anywhere). So then I try to hire someone. No response other than to look at the documentation again. The documentation is complete in every detail, but it is certainly not "simple". So I'm stuck going around in circles, getting nowhere.

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 Kevin Morris commented

The purpose is to get a token but the method is an HTTP POST request. Why you made a GET request?


11 comments
1 |3000

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

Kevin Morris avatar image Kevin Morris commented ·

Ok, I just figured that out. Now I'm unable to get past the "invalid_client" error message, even tho I'm using the creds that I use (successfully) to log into this developer site. Any suggestions? Thanks.

0 Likes 0 ·
Kevin Morris avatar image Kevin Morris commented ·

"Why you made a GET request? " ha ha ha... bc I'm a *beginner* ... that's why... Ha ha ha ha ha

0 Likes 0 ·
Kevin Morris avatar image Kevin Morris commented ·

{

"error": "invalid_client",

"errors": [

{

"errorCode": "OAU-153",

"message": "Invalid client: [my RingCentral dev phone number, without the plus sign]",

"parameters": [

{

"parameterName": "client_id",

"parameterValue": "[my RingCentral dev phone number, without the plus sign]"

}

]

}

],

"error_description": "Invalid client: 15306150381"

}

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Kevin Morris commented ·

Where did you get the client id? On the error message, it does not look like a client id to me. Also, how do you pack the client id and client secret?

I have some demo code how to login using native languages to authenticate with password flow authentication. Check them out.

Node JS

Python

PHP

0 Likes 0 ·
Kevin Morris avatar image Kevin Morris Phong Vu ♦♦ commented ·

Hi Phong, in order to allow you to see what I"m doing wrong, I have to send you my complete code and settings including my login ID, password, secret. I'm willing to do that via email, but not in a public forum. If you email me at notifyus@telus.net, then I can send you all the screen shots. (I'll put them in an encrypted file and send you the decryption pwd via another method). Viewing source code is not helping. I don't use any of the SDK source code, I use Lazarus and FreePascal. Once I get this "dialer" app working in Lazarus, I'll contribute it to RingCentral so they can use it as an example for other Lazarus programmers.

0 Likes 0 ·
Show more comments

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