03-17-2025 07:16 AM
My organization is migrating to Webex Calling from CUC/CUCM. Previously, I automated most tasks with PowerShell, but I will be migrating things to Python for Webex Calling with the hope of leveraging the wxcadm library. My organization's security team wants to leverage OAuth authentication, but I'm having trouble understanding how to implement it in my scripts. It is my understanding that the technicians running the scripts will need to log into the developer portal to get an authentication token that will then be put in the scripts.
Is that the only way to handle the authentication or am I missing something?
I'm used to working with Microsoft's Entra API and would love to have an authentication experience like theirs. I simply enter a command to connect to the API, and an authentication window appears where I enter my admin account credentials. The API session is then authenticated, and I don't have to pass any additional information to it. I'd be ok with passing the authentication token each time I make a request but I am hoping to at least have a simplified process of getting the authentication token without the need to log into the developer portal website.
03-17-2025 08:01 AM
The developer portal token is just for testing purposes. If you have an integration for your tasks check out Integration (https://developer.webex.com/docs/integrations) and Service Apps (https://developer.webex.com/docs/service-apps) depending on your use case. Both use OAuth, in both cases you will get an access and a refresh token.
During the authorization flow, a code will be issued to your client which must be extracted. I do not know the Python libraries, but I guess there are helpers as well.
I once registered a local host Uri and hooked the 404 error to get the code in a .net client application..
03-19-2025 10:26 AM
I did more research on the subject and figured out that my confusion was coming from the Access Token expiration for the Service App. Cisco documentation shows that it expires after 14 days and that we can refresh it with the Refresh Token. But I also read that the Refresh Token expired. To me that made the app registrations pointless.
It wasn't until this morning I finally found a different community discussion where it was mentioned that the Refresh Token automatically refreshes when it's used. Solved: Re: Access/ Refresh token renewal process - Cisco Community
I'll reiterate user lionelseydoux's comment that the token documentation in Build - Integrations | Webex for Developers and Build - Service Apps | Webex for Developers should be updated to mention that fact. I feel like I wasted a lot of time trying to figure this out.
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