09-27-2023 11:30 AM - edited 09-27-2023 11:30 AM
Hi,
I'm developing an integration for WebexCC. I created an application using https://developer.webex-cx.com/my-apps/create and checked all the available scopes.
I successfully managed to obtain an access token, however I can not find a way to obtain the org-id required for all the CC API calls.
When I try to use https://webexapis.com/v1/organizations to get it, I get an error message saying that my access token is missing the required scope.
What am I doing wrong?
Tnx,
Ben
Solved! Go to Solution.
09-27-2023 11:40 AM
OK.
Reading some sample code, I've found the solution. I write it here in case someone else will face the same issue:The
You can get the org id by splitting the access token by the underline ('_') character.
The Org Id is the 3rd element.
09-27-2023 11:55 AM
In case you want to access a Webex API, you'd have to request the required scopes for the endpoint as stated at https://developer.webex-cx.com/documentation/integrations/#scopes:
You can always add more scopes from our portfolio by editing your integration in the Webex Developer Portal. To see the list of available scopes (with descriptions) in the Webex Portal, check out this page).
To access the organization endpoint, you'd have to add (at least) spark:organizations_read
and your user must be an admin as stated at https://developer.webex.com/docs/api/v1/organizations.
That would be the reason why the endpoint tells you that you're lacking the required scopes.
09-27-2023 11:40 AM
OK.
Reading some sample code, I've found the solution. I write it here in case someone else will face the same issue:The
You can get the org id by splitting the access token by the underline ('_') character.
The Org Id is the 3rd element.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide