Skip to main content

hi,


i'm trying to get a customer's calls for the first time, but i get the error message in the subject.


the flow that was used:

1. the customer has authorized my application using the authentication flow (i got an access key using ring central's APIs).


2. using the following API, i tried to get the customer's extensions list, but got the error message.

the url i'm using is -

https://platform.ringcentral.com/restapi/v1.0/account/<ACCOUNT-NUMBER>/extension

(i use an account number, not the '~' sign).


3. i used my account in ring central to check the code i wrote, and noticed that when i use a user, that is defined as an admin in ring central, the APIs work without any problem, but when i use a standard user (not an admin), i also get the error in the subject.


my questions are:

1. when granting access, only an admin user can be used during authentication, in order to grant the access to the customer's data?


2. if a standard user can be used to grant access, then what am i doing wrong?


thanks :)


Hi Gaash,

The GET Extension List API would return the list of extensions created for a particular account. All types of extensions are included in this list.

Now, in order to get the extensions list under an account, you need not be an Admin to make this API request. The GET Extensions List can be retrieved using an Admin or a non-Admin User. 

Based on the description you have provided above, it looks like the <ACCOUNT-NUMBER> that you are providing might not actually belong to the Organization or the account itself.Using a '~' ( tilde ) should work for the logged-in user.

Can you verify if '~' works or not?

hi thanks for the reply. unfortunatelly, the tilde sign won't help, since there's no looged-in user. the API is executed in a fully back-end system, as part of a batch process. what else can be the cause for the error? how can it be, that an admin user authorization works, and a stardatd user doesn't?
unfortunatelly, the tilde sign won't help, since there's no looged-in user. the API is executed in a fully back-end system, as part of a batch process. 
What is the user you are Authorizing as to make the API request ? Would that user be a part of the organization / account ?

Per the error, I can think of it as you are authorized as a user A but then the <AccountID> which you are using in the API to retrieve the list of extensions does not belong to the same org / account as the user A


There is a logged-in user as long as you have the access token. "account/~" means the account which contains the user that you used to obtain the access token.

It is true that the access token is unable to fetch information from other accounts. Only fetch information from the current account is possible.
ok, thank you all for your answers.
i checked if the code works when i'm using the '~' sign instead of the account id, using the access token that was created when the standard user granted access, and it worked fine.

then, i checked what was the value of the account id i was using, and it turned out to be ring central owner id. this is actually a bug in my code, but it made me wonder:
how come, that when i used the owner id of an admin user in ring central, it worked fine, and i also managed to get other extensions calls?
how is it possible?

thanks.


Reply