Skip to main content
Answer

Understanding accountId parameter in account api

  • June 24, 2022
  • 1 reply
  • 734 views

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

Best answer by Anonymous

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.

1 reply

  • Answer
  • June 27, 2022

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.