question

Alex Wang avatar image
Alex Wang asked Alex Wang commented

What permission should I have to get Message List?

tried to get message list from an extension by call: /restapi/v1.0/account/:accountId/extension/:extensionId/message-store

but it looks like returned 200 with 0 items as below response:

{
    "uri": "https://platform.ringcentral.com/restapi/v1.0/account/3245691008/extension/62538302008/message-store?availability=Alive&dateFrom=2022-06-12T04:58:00.000Z&page=1&perPage=100",
    "records": [],
    "paging": {
        "page": 1,
        "totalPages": 1,
        "perPage": 100,
        "totalElements": 0
    },
    "navigation": {
        "firstPage": {
            "uri": "https://platform.ringcentral.com/restapi/v1.0/account/3245691008/extension/62538302008/message-store?availability=Alive&dateFrom=2022-06-12T04:58:00.000Z&page=1&perPage=100"
        },
        "lastPage": {
            "uri": "https://platform.ringcentral.com/restapi/v1.0/account/3245691008/extension/62538302008/message-store?availability=Alive&dateFrom=2022-06-12T04:58:00.000Z&page=1&perPage=100"
        }
    }
}

I'm able to see and download all messages from Admin panel, but am not be able to do that via API. Is there any permission should I have?

Thanks.


rest apimessagepermissions
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Embbnux Ji avatar image
Embbnux Ji answered Alex Wang commented

Hi @Alex Wang From the response, it show that you have permission to access that, but result is empty with query params.

Can you check that:

1. If you request data from right extension id: "/restapi/v1.0/account/~/extension/~/message-store" for current login extension user.
2. Try with "availability=Alive" removed
3. Try with longer dateFrom param
4. If you are requesting data in production environment. From the response, you are requesting data from production.

1 comment
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Alex Wang avatar image Alex Wang commented ·

Thanks. got fixed

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