Skip to main content

We archive our SMS data (texts and attachments) routinely with the message store exports API. However, ever since 6/13 the jobs were taking hours on end to complete or failing. Now I could start a job and it would probably never complete. I did open ticket 28218998 with support and the response is basically, “Yeah it is broken. No timeline on a fix.” I asked if they could even give a rough timeline like a month, two months, or longer and nothing. It kinda feels like this API is going to be deprecated.

Is anyone else also running into this with this API? Could it possibly be something on my side?

Yes, I know you could use the listExtensions API to then use the listMessages API and the readMessageContent API, but it is a PIA to go down that route when message store exports worked so well.

We archive our SMS data (texts and attachments) routinely with the message store exports API. However, ever since 6/13 the jobs were taking hours on end to complete or failing. Now I could start a job and it would probably never complete. I did open ticket 28218998 with support and the response is basically, “Yeah it is broken. No timeline on a fix.” I asked if they could even give a rough timeline like a month, two months, or longer and nothing. It kinda feels like this API is going to be deprecated.

Is anyone else also running into this with this API? Could it possibly be something on my side?

Yes, I know you could use the listExtensions API to then use the listMessages API and the readMessageContent API, but it is a PIA to go down that route when message store exports worked so well.

 

Let me run a quick test and talk to the dev support team and the engineering team.

Will get back to you soon. Stay tuned.


Here is my test results for a 6-month export

var endpoint = "/restapi/v1.0/account/~/message-store-report"
var params = {
                      dateFrom: "2025-01-01T00:00:00.000Z",
                      dateTo: "2025-06-15T23:59:59.999Z"
                   }

Task Created: 2025-06-20T14:12:43.737Z

Task Completed: 2025-06-20T14:17:48.462Z

So it took me 5 mins to export the data.

What is the dateFrom and dateTo you specified? And does it matter if you set it for a week or for a month?


Here is my test results for a 6-month export

var endpoint = "/restapi/v1.0/account/~/message-store-report"
var params = {
                      dateFrom: "2025-01-01T00:00:00.000Z",
                      dateTo: "2025-06-15T23:59:59.999Z"
                   }

Task Created: 2025-06-20T14:12:43.737Z

Task Completed: 2025-06-20T14:17:48.462Z

So it took me 5 mins to export the data.

What is the dateFrom and dateTo you specified? And does it matter if you set it for a week or for a month?

dateFrom: “2025-06-11T23:00:00.0000000Z”

dateTo: “2025-06-20T11:00:00.0000000Z”

I have a task that started today at ~7am and is still not complete. It seems to bounce from InProgress to Accepted repeatedly. I have not changed anything in my C# app on my side at all.

Should I try to create a new app in the dev portal?


Here is my test results for a 6-month export

var endpoint = "/restapi/v1.0/account/~/message-store-report"
var params = {
                      dateFrom: "2025-01-01T00:00:00.000Z",
                      dateTo: "2025-06-15T23:59:59.999Z"
                   }

Task Created: 2025-06-20T14:12:43.737Z

Task Completed: 2025-06-20T14:17:48.462Z

So it took me 5 mins to export the data.

What is the dateFrom and dateTo you specified? And does it matter if you set it for a week or for a month?

dateFrom: “2025-06-11T23:00:00.0000000Z”

dateTo: “2025-06-20T11:00:00.0000000Z”

I have a task that started today at ~7am and is still not complete. It seems to bounce from InProgress to Accepted repeatedly. I have not changed anything in my C# app on my side at all.

Should I try to create a new app in the dev portal?

Are you able to run Node JS code? If so can you run the sample code in this dev guide?

https://developers.ringcentral.com/guide/messaging/message-store/message-exports-report#javascript


So I ended up starting a new job at 1:30pm EST. It took until 4:30pm EST to complete. The task creation status constantly jumped from Accepted to InProgress multiple times during the job. This was in C# as well.

I just kicked off a job using the exact sample code from the developer portal besides changing the time frame. I just kicked it off and will let you know what happens. I am not too convinced it is necessarily the language used or my code since it is successfully starting a task, but it is just taking hours on end (I had one last night that took 8 hours). And seeing it jump from Accepted to InProgress then back to Accepted multiple times seems odd.

I am not grabbing a huge set of data either. Usually it is one day, sometimes a week and sometimes a month and I see the same time and task issues. Typically I am not searching that far back either.

So I will let you know how the node.js version runs….in probably 8 hours.

It all just feels like something is broken on RingCentral’s side or something was broken on our account.

Let me attach my logging from my most recent task (taskID omitted). It was a JSON, but I attached it as a txt.


Here is my test results for a 6-month export

var endpoint = "/restapi/v1.0/account/~/message-store-report"
var params = {
                      dateFrom: "2025-01-01T00:00:00.000Z",
                      dateTo: "2025-06-15T23:59:59.999Z"
                   }

Task Created: 2025-06-20T14:12:43.737Z

Task Completed: 2025-06-20T14:17:48.462Z

So it took me 5 mins to export the data.

What is the dateFrom and dateTo you specified? And does it matter if you set it for a week or for a month?

dateFrom: “2025-06-11T23:00:00.0000000Z”

dateTo: “2025-06-20T11:00:00.0000000Z”

I have a task that started today at ~7am and is still not complete. It seems to bounce from InProgress to Accepted repeatedly. I have not changed anything in my C# app on my side at all.

Should I try to create a new app in the dev portal?

Are you able to run Node JS code? If so can you run the sample code in this dev guide?

https://developers.ringcentral.com/guide/messaging/message-store/message-exports-report#javascript

So I ended up starting a new job at 1:30pm EST. It took until 4:30pm EST to complete. The task creation status constantly jumped from Accepted to InProgress multiple times during the job. This was in C# as well.

I just kicked off a job using the exact sample code from the developer portal besides changing the time frame. I just kicked it off and will let you know what happens. I am not too convinced it is necessarily the language used or my code since it is successfully starting a task, but it is just taking hours on end (I had one last night that took 8 hours). And seeing it jump from Accepted to InProgress then back to Accepted multiple times seems odd.

I am not grabbing a huge set of data either. Usually it is one day, sometimes a week and sometimes a month and I see the same time and task issues. Typically I am not searching that far back either.

So I will let you know how the node.js version runs….in probably 8 hours.

It all just feels like something is broken on RingCentral’s side or something was broken on our account.

Let me attach my logging from my most recent task (taskID omitted). It was a JSON, but I attached it as a txt.


@PhongVu I started the task using the below:

const RC = require('@ringcentral/sdk').SDK

// Instantiate the SDK and get the platform instance
var rcsdk = new RC({
server: "https://platform.ringcentral.com",
clientId: "OMITTED",
clientSecret: "OMITTED"
});
var platform = rcsdk.platform();

/* Authenticate a user using a personal JWT token */
platform.login({ jwt: "OMITTED" })
platform.on(platform.events.loginSuccess, function(e){
create_message_store_report()
});

platform.on(platform.events.loginError, function(e){
console.log("Unable to authenticate to platform. Check credentials.", e.message)
process.exit(1)
});

/*
* Create a task to export the account messages within March 2023
*/
async function create_message_store_report() {
try {
var bodyParams = {
dateFrom: "2025-06-01T00:00:00.000Z",
dateTo: "2025-06-19T23:59:59.999Z"
}
var endpoint = "/restapi/v1.0/account/~/message-store-report"
var resp = await platform.post(endpoint, bodyParams)
var jsonObj = await resp.json()
get_message_store_report_task(jsonObj.id)
} catch (e) {
console.log(e)
}
}

/*
* Check the task completion status
*/
async function get_message_store_report_task(taskId) {
try {
var endpoint = `/restapi/v1.0/account/~/message-store-report/${taskId}`
var resp = await platform.get(endpoint)
var jsonObj = await resp.json()
console.log(`Task creation status: ${jsonObj.status}`)
if (jsonObj.status == "Completed") {
get_message_store_report_archive(jsonObj.id)
} else if ( jsonObj.status == "AttemptFailed" ||
jsonObj.status == "Failed" ||
jsonObj.status == "Cancelled" ) {
console.log("Export message store failed.")
} else {
setTimeout(function() {
get_message_store_report_task(taskId)
}, 10000);
}
} catch (e) {
console.log(e)
}
}

/*
* When the task is completed, use the task id to get the uri of the report file
*/
async function get_message_store_report_archive(taskId) {
console.log("Getting report uri ...")
try {
var endpoint = `/restapi/v1.0/account/~/message-store-report/${taskId}/archive`
var resp = await platform.get(endpoint)
var jsonObj = await resp.json()
var date = new Date()
for (var i = 0; i < jsonObj.records.length; i++) {
var fileName = `message_store_content_${date.toISOString()}_${i}.zip`
get_message_store_report_archive_content(jsonObj.recordsri].uri, fileName)
}
} catch (e) {
console.log(e)
}
}

const fs = require('fs')
const https = require('https')
const url = require('url')

async function get_message_store_report_archive_content(contentUri, fileName){
var u = url.parse(contentUri)
var tokenObj = await platform.auth().data()
var accessToken = tokenObj.access_token
download(u.host, u.path, accessToken, fileName, function(){
console.log(`${fileName} file is saved to the local machine.`)
})
}

const download = function(domain, path, accessToken, dest, cb) {
var file = fs.createWriteStream(dest);
var options = {
host: domain,
path: path,
method: "GET",
headers: {
Authorization: `Bearer ${accessToken}`
}
}
const req = https.request(options, res => {
res.pipe(file);
file.on('finish', function() {
file.close(cb);
});
})
req.on('error', error => {
console.error(error)
})
req.end()
}

Which is the same as the sample. I started it at 4:40pm EST yesterday, 6/20. It has now been ~16 hours and it is still not complete. It keeps doing that thing where it is bouncing from Accepted to InProgress then back to Accepted.


@PhongVu I started the task using the below:

const RC = require('@ringcentral/sdk').SDK

// Instantiate the SDK and get the platform instance
var rcsdk = new RC({
server: "https://platform.ringcentral.com",
clientId: "OMITTED",
clientSecret: "OMITTED"
});
var platform = rcsdk.platform();

/* Authenticate a user using a personal JWT token */
platform.login({ jwt: "OMITTED" })
platform.on(platform.events.loginSuccess, function(e){
create_message_store_report()
});

platform.on(platform.events.loginError, function(e){
console.log("Unable to authenticate to platform. Check credentials.", e.message)
process.exit(1)
});

/*
* Create a task to export the account messages within March 2023
*/
async function create_message_store_report() {
try {
var bodyParams = {
dateFrom: "2025-06-01T00:00:00.000Z",
dateTo: "2025-06-19T23:59:59.999Z"
}
var endpoint = "/restapi/v1.0/account/~/message-store-report"
var resp = await platform.post(endpoint, bodyParams)
var jsonObj = await resp.json()
get_message_store_report_task(jsonObj.id)
} catch (e) {
console.log(e)
}
}

/*
* Check the task completion status
*/
async function get_message_store_report_task(taskId) {
try {
var endpoint = `/restapi/v1.0/account/~/message-store-report/${taskId}`
var resp = await platform.get(endpoint)
var jsonObj = await resp.json()
console.log(`Task creation status: ${jsonObj.status}`)
if (jsonObj.status == "Completed") {
get_message_store_report_archive(jsonObj.id)
} else if ( jsonObj.status == "AttemptFailed" ||
jsonObj.status == "Failed" ||
jsonObj.status == "Cancelled" ) {
console.log("Export message store failed.")
} else {
setTimeout(function() {
get_message_store_report_task(taskId)
}, 10000);
}
} catch (e) {
console.log(e)
}
}

/*
* When the task is completed, use the task id to get the uri of the report file
*/
async function get_message_store_report_archive(taskId) {
console.log("Getting report uri ...")
try {
var endpoint = `/restapi/v1.0/account/~/message-store-report/${taskId}/archive`
var resp = await platform.get(endpoint)
var jsonObj = await resp.json()
var date = new Date()
for (var i = 0; i < jsonObj.records.length; i++) {
var fileName = `message_store_content_${date.toISOString()}_${i}.zip`
get_message_store_report_archive_content(jsonObj.recordsri].uri, fileName)
}
} catch (e) {
console.log(e)
}
}

const fs = require('fs')
const https = require('https')
const url = require('url')

async function get_message_store_report_archive_content(contentUri, fileName){
var u = url.parse(contentUri)
var tokenObj = await platform.auth().data()
var accessToken = tokenObj.access_token
download(u.host, u.path, accessToken, fileName, function(){
console.log(`${fileName} file is saved to the local machine.`)
})
}

const download = function(domain, path, accessToken, dest, cb) {
var file = fs.createWriteStream(dest);
var options = {
host: domain,
path: path,
method: "GET",
headers: {
Authorization: `Bearer ${accessToken}`
}
}
const req = https.request(options, res => {
res.pipe(file);
file.on('finish', function() {
file.close(cb);
});
})
req.on('error', error => {
console.error(error)
})
req.end()
}

Which is the same as the sample. I started it at 4:40pm EST yesterday, 6/20. It has now been ~16 hours and it is still not complete. It keeps doing that thing where it is bouncing from Accepted to InProgress then back to Accepted.

Job failed. Ended up erroring out with a “token not found” error.


Sorry for the delayed response. It seems this issue is happening to some accounts (not all accounts). The issue is escalated to the engineering team for further investigation and fixing it. Please stay tuned and I will update you when I hear more from them.

Your patience is much appreciated!


Reply