Skip to main content
Question

Call Details for Outbound Campaigns via API?


I am having trouble figuring out how use the API to get the call details like success/failure, duration, etc for outbound calls that are made using the call list and campaign section. We load the call lists, run the campaign, and can view the call details in the “Interaction Details” dashboards in Ring CX Analytics. But we need to get these call details brought back into our system via API. I am using the platform SDK, Postman and CURL and the developer test console with the same results all the time. Here’s as simple of an example as I can give.

 

Query:

curl --request GET \
  --url 'https://platform.ringcentral.com/restapi/v1.0/account/XXXXXXXX/call-log?view=Detailed&withRecording=true&page=1&perPage=100' \
  --header 'accept: application/json' \
  --header 'authorization: Bearer XXXXX...XXXXX’

 

Response:

{ "errorCode": "InvalidParameter", "message": "Resource for parameter [accountId] is not found", "errors": [ { "errorCode": "CMN-102", "message": "Resource for parameter [accountId] is not found", "parameterName": "accountId" } ], "parameterName": "accountId" }

 

If I just use ~ as my accountId, I only get records for my personal phone number, even though I am a Super Admin. I need to get all the results for my account - especially the campaigns. The Account ID is XXXXXXXX which I get from our account parameters or when I add the account number to the above mentioned analytics report in RingCX Analytics.

 

Am I looking in the wrong place for the call details for the outbound campaigns that we run? How can I get those via API?

 

Thanks, David

7 replies

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2329 replies
  • April 2, 2025

You mentioned RingCX and you call the RingEX API?

This is the only endpoint I can find from RingCX platform for reading the call analytics.


  • Author
  • New Participant
  • 4 replies
  • April 2, 2025

I have to admit - I am pretty lost with all the different platforms, auth methods, and various API versions and so on. I’ve never seen ‘https://engage.ringcentral.com...’ anywhere. But now when I try it following exactly what’s on that link to the endpoint you just posted, all I get are 404 errors. 

 

I know I see a report in RingCX that has the info I am looking for. I am trying to avoid having to go into the console and manually downloading a spreadsheet every day, or twice a day. An API that gives me a CSV to email or SFTP is not very elegant. But if that’s all I can get, I guess I will go for that. How can I figure out which API I should be connecting to and getting my data? And why am I getting this from that endpoint? I get 404 for every report type I try. 

 

% curl --request GET \
  --url https://engage.ringcentral.com/voice/api/v1/admin/reports/GLOBAL_CALL_TYPE_DELIMITED \
  --header 'accept: application/json' \
  --header 'authorization: Bearer eyXXXXXXX…..XXXXXXX'


<!doctype html><html lang="en"><head><title>HTTP Status 404 – Not Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 – Not Found</h1></body></html>


PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2329 replies
  • April 2, 2025
davidyak wrote:

I have to admit - I am pretty lost with all the different platforms, auth methods, and various API versions and so on. I’ve never seen ‘https://engage.ringcentral.com...’ anywhere. But now when I try it following exactly what’s on that link to the endpoint you just posted, all I get are 404 errors. 

 

I know I see a report in RingCX that has the info I am looking for. I am trying to avoid having to go into the console and manually downloading a spreadsheet every day, or twice a day. An API that gives me a CSV to email or SFTP is not very elegant. But if that’s all I can get, I guess I will go for that. How can I figure out which API I should be connecting to and getting my data? And why am I getting this from that endpoint? I get 404 for every report type I try. 

 

% curl --request GET \
  --url https://engage.ringcentral.com/voice/api/v1/admin/reports/GLOBAL_CALL_TYPE_DELIMITED \
  --header 'accept: application/json' \
  --header 'authorization: Bearer eyXXXXXXX…..XXXXXXX'


<!doctype html><html lang="en"><head><title>HTTP Status 404 – Not Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 404 – Not Found</h1></body></html>

Based on the API reference, it’s a POST method not a GET.
You may get more instructions from the Dev Guide doc.


  • Author
  • New Participant
  • 4 replies
  • April 2, 2025

That curl I pasted in is a GET not a POST. https://developers.ringcentral.com/engage/voice/api-reference/Reporting/getReportCriteriaTemplate

Should I just talk to the https://engage.ringcentral.com API set and not any other?  Is that the API for RingCX?

Or do I have to also use https://platform... to get authenticated and a token? It’s very difficult for me to know which flow and which platform to use. Sorry - I feel like I am shooting in the dark.

 

david


  • Author
  • New Participant
  • 4 replies
  • April 2, 2025

In the Dev Guide doc link you provided, it says this. Is this what I should be using?

 

RingCX is using the host server, and is accessible on https://ringcx.ringcentral.com.

  • Authentication path /api/auth/login
  • API endpoint path /voice/api/v1
  • Platform base url /platform/api

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2329 replies
  • April 2, 2025
davidyak wrote:

In the Dev Guide doc link you provided, it says this. Is this what I should be using?

 

RingCX is using the host server, and is accessible on https://ringcx.ringcentral.com.

  • Authentication path /api/auth/login
  • API endpoint path /voice/api/v1
  • Platform base url /platform/api

To be honest, I have not used the RingCX for years. But I believe that the authentication is still the same. Check this page to choose the endpoint accordingly.


  • Author
  • New Participant
  • 4 replies
  • April 5, 2025

I figured some things out so I thought I would post my solution in the case that anyone else is ever as puzzled as I was. I won’t try to explain why it works, but these are the steps I followed.

 

  1. POST to https://platform.ringcentral.com/restapi/oauth/token and use Basic Auth with the ClientID and ClientSecret you create in the developers portal for your application. That app needs ReadCallLog permissions, and should use the JWT flow. Your post body will include the grant_type = urn:ietf:params:oauth:grant-type:jwt-bearer and assertion = {your jwt token setup in the developers portal}
  2. Use the access_token you get from the above call in the POST body of https://ringcx.ringcentral.com/api/auth/login/rc/accesstoken with rcAccessToken = {access_token from above} and rcTokenType = Bearer. You will get another, different access_token. This call needs No Authorization. I still need to figure out the refresh token but the access token works for 5 minutes.
  3. Use that second access token in the Authorization header for a POST to https://ringcx.ringcentral.com/voice/api/v1/admin/accounts/XXXXXXXX/reportsStreaming. Auth type is Bearer token and the value is the access_token from step 2. XXXXXXXX is your RC Account ID. Your POST body is a structure defining your report parameters looking something like this.

{

"reportType":"DIALER_RESULT_DOWNLOAD",

"reportCriteria":{

"criteriaType":"DIALER_RESULT_DOWNLOAD_CRITERIA",

"startDate":"2025-04-03T00:00:00.000-0000",

"includeAuxData":true,

"includeXferData":true,

"includeSpeedToLead":true,

"dialedLeadsReportType":"ALL_LEADS",

"systemDisposition:":"ALL",

"schedule": {

"repeatOption":"ONCE",

"scheduleTimezoneName":"US/Eastern"

}

}

}

 

This last step is described in this doc https://developers.ringcentral.com/engage/voice/guide/analytics/reports/dialer-result-download-report

and you can also download your call details with this slightly different POST body. https://developers.ringcentral.com/engage/voice/guide/analytics/reports/global-call-type-detail-report

 

I am using Postman for this so some of my terms relate to that. You could use curl, python or the SDK from what I can see. It wasn’t easy to figure all this out, and I had to call two different hosts with three different endpoints, documented in three different places, but it got the job done.

 

Thank you ​@PhongVu for your comments. 

 

David


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings