question

Tanya Baluja avatar image
Tanya Baluja asked Phong Vu commented

Do attachments has an API endpoint for metadata?

The attachment GET operation is rated a "Medium", but all I want to do is get the metadata for everything I've already cached without disturbing my rate limits. What's the best way to get cache message types?

apiapi sms
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.

1 Answer

Phong Vu avatar image
Phong Vu answered Phong Vu commented

What metadata you are looking for. Reading the message store you will get a list of messages with the attachments object in each message. The attachments contains metadata about the attachments. Isn't that what you want to get?

screen-shot-2021-01-19-at-83204-pm.png



2 comments
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.

Yes, that's exactly what I'm looking for. The issue I'm facing, however, is that the Message Store only retrieves the last 5000 messages per account, and some attachments are older than those 5000. Is there no way to get the metadata purely by the attachment ID?

0 Likes 0 ·

What do you mean the last 5000? You can read 1000 records per page and you can call the API 40 times per minute. This enable you to read up to 40,000 records per minute.

You can use the dateFrom and dateTo to control how far back you want to read from the message store. However, you may not be able to read old message records because of your account data retention policy.

Alternative to reading the message store, you can use the message store export API to export the data. Read this blog to learn more.

0 Likes 0 ·

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