question

Adrian Carreon avatar image
Adrian Carreon asked Phong Vu answered

In order to call this API endpoint for another extension, one of the following permissions [ReadMessages] have to be granted with extended scope to the authorized user

When I make requests to the API to obtain the data of the messages by user, I receive this error as a response:

“In order to call this API endpoint for another extension, one of the following permissions [ReadMessages] have to be granted with extended scope to the authorized user.”


- endpoint: /restapi/v1.0/account/accountId/extension/extensionId/message-store

(https://developers.ringcentral.com/api-reference/Extensions/listExtensions)


What permits are necessary? And where can I assign them?

rest api
1 |3000

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

The error message is misleading. I guessed that you try to read the message store of another user extension, not the user extension who is authenticated to call the API

- endpoint: /restapi/v1.0/account/accountId/extension/[extensionId]/message-store

Try this to read the message store of the extension being authenticated:

- endpoint: /restapi/v1.0/account/~/extension/~/message-store

If you get the list of extensions and get the extension id to read the message store of each extension under the account. You must login your app with an "Admin user" extension.

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

1 |3000

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

Da Kong avatar image
Da Kong answered Adrian Carreon commented

Log in on https://developers.ringcentral.com/ . Go to Developer Console -> Apps -> Select your app -> Settings -> App Permission section -> Tick on your Read Message permission

You could also take a look at other stuff there to have better idea of what can be configured for your app :)


1622524160547.png


1622524160547.png (88.1 KiB)
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.

Adrian Carreon avatar image Adrian Carreon commented ·

Thank you for the quick response.

In fact, my application has already assigned that permission but it still keeps throwing me that error.
What else can I do?
captura-de-pantalla-2021-05-27-a-las-90829.png

0 Likes 0 ·
Adrian Carreon avatar image
Adrian Carreon answered

Thank you for the quick response.

In fact, my application has already assigned that permission but it still keeps throwing me that error.


What else can I do?

captura-de-pantalla-2021-05-27-a-las-90829.png


1 |3000

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