Skip to main content
The First Step
Jun 23, 2021 7:17 PM UTC
Question

Retrieve all SMS messages from entire account

How can I retrieve all SMS Messages to/from a phone number from our entire account? I am only able to pull messages to/from a specific extension using the API test method.

    3 replies

    PhongVu
    Community Manager
    Community Manager
    Jun 23, 2021 7:38 PM UTC

    You have to login your app as a super admin, read all extensions to get a list of extension ids, then call the user message-store endpoint to read each extension SMS message.

    /restapi/v1.0/account/~/extension/[extensionId]/message-store

    james-1The First StepAuthor
    The First Step
    Jun 23, 2021 7:52 PM UTC

    Hi Phong

    Will I have to call each extension one at a time? Is there a way to get all messages send from anyone in the company with a single API Call?

    PhongVu
    Community Manager
    Community Manager
    Jun 23, 2021 9:08 PM UTC

    The only choice is to use the message store export API. Unfortunately, that API does not support much of filtering to export just a certain message type. Check this out if it helps.

    https://developers.ringcentral.com/api-reference/Message-Exports/createMessageStoreReport

    https://medium.com/ringcentral-developers/how-to-archive-companys-messaging-content-3d051068667b