cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1528
Views
2
Helpful
5
Replies

Problems using telephony/calls API - Getting started

CaioRocha
Level 1
Level 1

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?

 

1 Accepted Solution

Janos Benyovszki
Cisco Employee
Cisco Employee

@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.

View solution in original post

5 Replies 5

Janos Benyovszki
Cisco Employee
Cisco Employee

@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.

@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

Janos Benyovszki
Cisco Employee
Cisco Employee

@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.

@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?

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.