question

Kevin Morris avatar image
Kevin Morris asked ·

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.

token
1 |1000 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.

Phong Vu avatar image
Phong Vu answered ·

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 Share
1 |1000 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.

Test.

0 Likes 0 · ·

I will upload some screenshots.

0 Likes 0 · ·

https://platform.devtest.ringcentral.com/restapi/oauth/token?grant_type=password&username=[my dev phone number including the + character]&password=[my dev password]

0 Likes 0 · ·

Here are the images of Postman.

0 Likes 0 · ·
image-01.jpg (152.0 KiB)

Image 2

0 Likes 0 · ·
image-02.jpg (170.7 KiB)
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.

Share
1 |1000 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.

Phong Vu avatar image
Phong Vu answered ·

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


11 comments Share
1 |1000 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.

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 · ·

"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 · ·

{

"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 · ·

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 · ·

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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