question

Nikolai Chashchin avatar image
Nikolai Chashchin asked Suyash Joshi commented

Understanding accountId parameter in account api

Hi Community,

According to https://developers.ringcentral.com/guide/account the account info can be requested using GET /restapi/v1.0/account/{accountId}.

It is also mentioned that one may provide either explicit accountId or use the simplified syntax of a tilde (~). A tilde instructs RingCentral to use the account id associated with the current authentication context.

I'm trying to figure out a use case for explicity providing accountId for the request. So far at this forum people are recommended to use `~` in every place instead of accountId.

Can you please give an example of a situation where accountId parameter is really needed?

Best,

Nikolai

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.

1 Answer

Suyash Joshi avatar image
Suyash Joshi answered Suyash Joshi commented

Hi @Nikolai Chashchin per the documentation "One may provide either explicit accountId or use the simplified syntax of a tilde (~). A tilde instructs RingCentral to use the account id associated with the current authentication context." so it is telling us that this is just another option to do the same operation for the same use case. I

If you are really concerned about a differentiation, one might argue that with "~" you won't have to hard code your "accountId" string in your code which might be a more secure way when using GET /restapi/v1.0/account/{accountId} and related APIs.

2 comments
1 |3000

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

Thank you, Suyash!

1 Like 1 ·

please consider 'accepting' this answer so we can close it :)

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