question

Adam Bryant avatar image
Adam Bryant asked Adam Bryant answered

statusCode: 406 when testing message-store-report API

Hello,

I am implementing message archiving using the message-store-report API and have successfully used the calls to create and download the zipped archive files. I am now setting up an automated process to do this on a schedule but in testing this I'm getting the response below on the final call to download the zip files. Have I just run the test too many times and been cut off for a bit? Any help would be appreciated, thanks!

/restapi/v1.0/account/~/message-store-report/688574005-688574005-8ad16417af6445f3bac4801a2ca14c3d/archive/0

(Including a header of accept: application/zip)


Response:

{

"statusCode": 406,

"headers": {

"Pragma": "no-cache",

"X-XSS-Protection": "1; mode=block",

"X-Frame-Options": "DENY",

"X-Content-Type-Options": "nosniff",

"X-Rate-Limit-Group": "heavy",

"X-Rate-Limit-Limit": "10",

"X-Rate-Limit-Remaining": "4",

"X-Rate-Limit-Window": "60",

"RoutingKey": "SJC11P01",

"RCRequestId": "0d9c7c8a-72f4-11eb-b299-005056bb4f35",

"Cache-Control": "no-store, must-revalidate, no-cache, max-age=0",

"Date": "Fri, 19 Feb 2021 20:50:08 GMT",

"Content-Length": "0",

"Expires": "0"

}

}

apimessage-store
1 |1500 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 Phong Vu edited

Based on the response, it was not the API rate limit because you still have 4 remaining for that 60 secs window.

How often do you receive this? How often do you export? Have you tested with a longer exporting period?

1 |1500 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.

Adam Bryant avatar image
Adam Bryant answered

@Phong Vu I was getting this every time I called for the archive files. We were still testing so frequency of export was inconsistent and after reading your response I tested a 180 day period with same error.

Today I looked back at the successful calls I had made that were setup differently than this current solution and noticed I had left out the "accept application/zip" header. I took that out of this solution and it worked again, returning the binary archives with a 200 response!

I'm not sure why leaving out the header works but it seems fine for now! Just FYI, in this solution I have created custom Logic App connectors for these APIs in Azure to be used in Logic Apps.

1 |1500 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.

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