News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
New to RingCentral and API,new to RingCentral and API
Tags: getting started
Apr 12, 2021 at 12:05pm   •   4 replies  •  0 likes
RM

I'm trying to determine where to start. I have read a few post on here, read the API reference and Developers Guide on rigncentral.com.

https://developers.ringcentral.com/guide/voice/call-log/reading-call-log

What I'm trying to accomplish is "download the call log" so it can be uploaded or loaded into the data warehouse for long term keeping and reporting.

With that said I was trying to test the API calls just as a test in Fiddler. just to get my feet wet.

But

1. I did create an "app" on the sandbox.

2. Don't know if the sandbox has calls to query? I sure didn't create any calls, I don't know how. Is it possible to have "test data" or able to query the production call logs?

3. As a simple test in Fiddler I was sending

Get https://platform.devtest.ringcentral.com/restapi

with the header of

accept: 'application/json'

authorization: Bearer 'encrypted string here'

Host: platform.devtest.ringcentral.com

but my response I get is

[Fiddler] The connection to 'platform.devtest.ringcentral.com' failed. <br />System.Security.SecurityException Failed to negotiate HTTPS connection with server.fiddler.network.https&gt; HTTPS handshake to platform.devtest.ringcentral.com (for #249) failed. System.IO.IOException Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. &lt; An existing connection was forcibly closed by the remote host

So I don't know if I need to get auth first or how to do that?


Is there a developers guide that "walks" you through the needed steps and what they are?

Also does anyone know how to get Fiddler or any other "API test" app to just make a few test API calls and see what it response is.


I tried to call the Call API with the https://developers.ringcentral.com/api-reference/Call-Log/readCompanyCallRecord

but since I may not have any calls it doesn't return anything. Again how can I get the sandbox with call data?


,

I'm trying to determine where to start. I have read a few post on here, read the API reference and Developers Guide on rigncentral.com.

https://developers.ringcentral.com/guide/voice/call-log/reading-call-log

What I'm trying to accomplish is "download the call log" so it can be uploaded or loaded into the data warehouse for long term keeping and reporting.

With that said I was trying to test the API calls just as a test in Fiddler. just to get my feet wet.

But

1. I did create an "app" on the sandbox.

2. Don't know if the sandbox has calls to query? I sure didn't create any calls, I don't know how. Is it possible to have "test data" or able to query the production call logs?

3. As a simple test in Fiddler I was sending

Get https://platform.devtest.ringcentral.com/restapi

with the header of

accept: 'application/json'

authorization: Bearer 'encrypted string here'

Host: platform.devtest.ringcentral.com

but my response I get is

[Fiddler] The connection to 'platform.devtest.ringcentral.com' failed. <br />System.Security.SecurityException Failed to negotiate HTTPS connection with server.fiddler.network.https&gt; HTTPS handshake to platform.devtest.ringcentral.com (for #249) failed. System.IO.IOException Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. &lt; An existing connection was forcibly closed by the remote host

So I don't know if I need to get auth first or how to do that?


Is there a developers guide that "walks" you through the needed steps and what they are?

Also does anyone know how to get Fiddler or any other "API test" app to just make a few test API calls and see what it response is.


I tried to call the Call API with the https://developers.ringcentral.com/api-reference/Call-Log/readCompanyCallRecord

but since I may not have any calls it doesn't return anything. Again how can I get the sandbox with call data?


4 Answers
answered on Apr 15, 2021 at 5:06am  

Ok so I got the "App" to graduate to production. But know I'm confused on what user to use to make the calls. On the sandbox under the Apps -> credentials screen there is

user name - which is a phone number

password - which was created and I can reset it.


but for production I only see the user name as a phone number (different phone number / username then the sandbox) but no password. I can't set the password neither as the column is set to N/A.


So to make the API calls that I was making in the Sandbox how can I do that in Prod? As in the sandbox I would call restapi/oauth/token with the user name and password.



 0
answered on Apr 13, 2021 at 10:53am  

I'm finally getting somewhere with Postman but now I'm getting an error calling the oauth API

I'm using this as reference

Example 1: Phone number as a username

Request

POST /restapi/oauth/token HTTP/1.1 
Accept: application/json 
Content-Type: application/x-www-form-urlencoded 
Authorization: Basic cmVsLWFsbC1wZXJtaXNzaWXFjMmpRZmlQcnlkSUkweE92QQ== 
grant_type=password&username=18559100010*123&password=121212


here is my call

https://platform.devtest.ringcentral.com/restapi/oauth/token?grant_type=password&username=<phone number from sandbox>&password=<password for user in sandbox>

header

Authorization: Basic <enter encoded string for client id and client secret from sandbox>

Accept: application/json

Content-Type: application/x-www-form-urlencoded


response

{

"error": "invalid_grant",

"errors": [

{

"errorCode": "OAU-140",

"message": "Invalid resource owner credentials"

}

],

"error_description": "Invalid resource owner credentials"

}


I have reset the password for my user. I'm able to login into the https://login.devtest.ringcentral.com/

with the user name and password


I don't know what could be causing the issue and I can't figure out how to log into rincentral.com and run the API explore in the sandbox as that user.


 0
on Apr 13, 2021 at 11:41am   •  0 likes

This should be separate: https://platform.devtest.ringcentral.com/restapi/oauth/token

and this should be in body: grant_type=password&username=<phone number from sandbox>&password=<password for user in sandbox>

Content-Type: application/x-www-form-urlencoded

on Apr 13, 2021 at 1:21pm   •  0 likes

in postman when I place grant_type in the body (using the body tab) it gives the error of

{

"error": "invalid_request",

"errors": [

{

"errorCode": "OAU-250",

"message": "Unsupported grant type"

}

],

"error_description": "Unsupported grant type"

}

but when I pass it in as a param (using Params tab) it gives the other error

on Apr 13, 2021 at 1:49pm   •  0 likes

Hope this helps

1618346990122.png

on Apr 13, 2021 at 2:02pm   •  0 likes

yes, it help.. that made it work. thanks

on Apr 13, 2021 at 11:33am   •  0 likes

What is your app client id?

on Apr 13, 2021 at 11:47am   •  0 likes

why do u need my client id?

I took the client id and client secret and encoded them like the directions stated. Using a : to be place between them.

on Apr 13, 2021 at 1:14pm   •  0 likes

Why? Because I need to see if your app type is correct. Also, if this "cmVsLWFsbC1wZXJtaXNzaWXFjMmpRZmlQcnlkSUkweE92QQ==" is the actual basic encoded string of your client id and client secret, then you screwed up with the encoding.

on Apr 13, 2021 at 1:18pm   •  0 likes

the client id is bWeTMUX3T0y6Bd0tDCtKtA

and that encoded string cmVsLWFsbC1wZXJtaXNzaWXFjMmpRZmlQcnlkSUkweE92QQ== is from the sample on the web site. Is not what my encoded string is.

btw my app type is "other non-ui" as we plan to use the API to get the call logs to load into the in house warehouse.

on Apr 13, 2021 at 1:23pm   •  0 likes

What? You copied this string "cmVsLWFsbC1wZXJtaXNzaWXFjMmpRZmlQcnlkSUkweE92QQ==" from somewhere and it is not the encoded of your own app client id and client secret?

App type "Other non-UI" is correct. But the Basic string is NOT if it is not your own.

on Apr 13, 2021 at 1:29pm   •  0 likes

I didn't post my encoded string..

I was just referencing the sample on the
https://developers.ringcentral.com/guide/authentication/tokens

the Basic string on my postman is my own and is different then the one u posted.

answered on Apr 12, 2021 at 1:25pm  

ok thanks for the reply and I will check out the articles.

But is there another way to test the API calls from another app? I know I can test with the API explore in RingCentral.


 0
on Apr 12, 2021 at 1:35pm   •  0 likes

Try from postman client

on Apr 12, 2021 at 1:49pm   •  0 likes

I got postman to work. But now I need help with the other questions or comments from my original post. How can I get sandbox data?

on Apr 12, 2021 at 2:39pm   •  0 likes

Open this link and download the RC Phone app for Desktop. Switch it to sandbox mode and use it to make test calls to generate call log data.

Switch mode:

MacOS: fn + command + f2

Windows: ctrl + F2

screen-shot-2021-04-12-at-23555-pm.png

answered on Apr 12, 2021 at 1:15pm  

I found some below reference where it seems Fiddler have issues in connecting SSL system:

https://stackoverflow.com/questions/44141255/fiddler-4-6-cannot-connect-to-strong-ssl

https://developers.de/2018/08/30/fiddler-tls-issues/

Could you please check once


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us