03-06-2023 07:21 AM
Hi everyone, I'm having some difficulties using the Webex API, more specifically the Call Controls endpoint. Initially I tried to use it with an adimin account, but I ended up changing to a Developer Sandbox account due to the need for a License, at the moment with the developer account I am receiving the following request message
GET "https://webexapis.com/v1/telephony/calls".
{
"message": "Target user not authorized",
"errors": [
{
"description": "Target user not authorized",
"code": 9601
}
],
"trackingId": "CXAPI_64060051-CBF2-01BB-013C-AC12DEC1013C"
}
I tried to solve this problem by generating a token by an integration giving the "-spark:calls_read" and "-spark:calls_write" scopes, but that didn't work either. Was there anything else I could do? Any permissions I have to enable?
Solved! Go to Solution.
03-07-2023 04:18 AM
@CaioRocha log in to the Sandbox on admin.webex.com with a Full Admin and check the licenses of the user under Users. It probably misses the Webex Calling license, so if you add that you should be able to get rid of that error.
03-07-2023 04:18 AM
@CaioRocha log in to the Sandbox on admin.webex.com with a Full Admin and check the licenses of the user under Users. It probably misses the Webex Calling license, so if you add that you should be able to get rid of that error.
03-07-2023 07:10 AM
@Janos Benyovszki I appreciate your answer!
I did what you said in the last comment and the request worked! It brought status 200, I noticed that it brought an empty list of calls. Do I have to include anything else to bring 1 to 1 calls other than PSTN?
Or via API is not possible?
In case you need I open another conversation about these last questions
03-07-2023 03:10 AM
@CaioRocha not sure which Sandbox you are using, but the ones here https://developer.webex.com/docs/developer-sandbox-guide should work. You get that error message, because the Webex Calling license is not assigned to the user you are using to communicate with the API. Please add that, or if you don't have that license option, request a new Sandbox from the above link.
03-07-2023 03:43 AM
@Janos Benyovszkithanks for the answer, the Developer Sandbox account was created following the step by step of the link you sent me.
You said it's the lack of a license, how can I get it?
03-14-2023 06:15 AM
The sandbox org you created has Webex Calling licenses so you just need to assign the license to the users you create in the org that you want to have the license.
See: https://help.webex.com/en-us/article/9dmqgv/Edit-service-licenses-in-Control-Hub-for-individual-users
You can also assign licenses to users using the /people API.
You can get the your license IDs from the /licenses API.
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