11-25-2025 05:05 AM
Hi,
We are developing middleware server which will act bridge between CRM Client Application (e.g. Salesforce) and WebEx Calling platform. Our middleware server will receive "Click-2-Call/Dial" request from Salesforce CRM Users and initiate call on Behalf-Of-WebEx-User using WebEx Calling REST API and receive call progress events from WebEx Calling platform by registering required Webhook.
We are able to achieve for single user by generating Token using that WebEx User's login credentials to authorize. Now we are designing our application for all Salesforce CRM users who have WebEx Calling feature.
Our queries are-
1 - Can you please suggest type of application we should register in WebEx - Integration Or Service App?
2 - From which User we will generate Authorization Code? Is there any sample code available for this?
3- Similarly , how to generate "Access Token" on behalf of all users.
Thanks & Regards,
Umesh Chaurasia
11-26-2025 01:33 AM
Let me give your one feedback about my application.
Case 1- I tried with Integration app and tested for one WebEx user by clicking on Dial button in our app. The call was initiated from User's Webex client and our application was able to receive events for Answering/Disconnect. In this Webex user has authorize for access and token were generated after authorization.
Case 2- Today I registered our application as "Service App" and authorize that application from WebEx Admin login. We are able to generate Access Token & Refresh Token. Our Application Webhook module is able to register WebHook using the Service App access token but getting following error when call "Dial" REST API -
{"destination":"3262"}
Response = InboundJaxrsResponse{context=ClientResponse{method=POST, uri=https://webexapis.com/v1/telephony/calls/dial, status=403, reason=Forbidden}}
Response = 403
Response = Forbidden
Can you please let us know if Service App is supported for WebEx Calling Call Controls REST API?
Are we missing anything in our application configuration?
We are using WebEx Sandbox.
Thanks & Regards,
Umesh
11-25-2025 11:25 PM
Hi @upchaurasia,
Thanks for your patience so far!
So here are the answers below for your questions -
1 - Can you please suggest type of application we should register in WebEx - Integration Or Service App?
It's depend on your requirement actually and you're free to use as per your choice since ultimately both of these application's main purpose is to generate access and refresh token pair.
But the only difference between the 2 processes is, in case of Integration - a User always needs to sign-in first to authorize him/her-self with his/her Webex account credentials before generating the token pair.
However in case of Service App, you don't need to sign-in and for Service App, you don't need of any OAuth Code. You can directly generate the token pair in Webex developer Portal service App settings page once the App is approved in Control Hub by one of your Org's full admin.
For Service App, you can give a quick read through to this article - https://developer.webex.com/blog/leveraging-service-apps-for-secure-and-scalable-api-calls-a-guide-for-admins-and-developers and things will get clearer to you.
2 - From which User we will generate Authorization Code? Is there any sample code available for this?
Authorization Code will be applicable only in case of Webex integration and you need to generate it using the Integration OAuth Authorization URL. You have to browse through that URL in browser private mode (that's the best practice) and the User who is trying to generate the token, that user will run the OAuth Authorization url in browser for generating the Code. This is the time when a User has to sign-in to Webex to authorize and then once you'll be on the landing page of redirect_url which is set in the Webex integration settings page, there in the page URL section of the browser you can find the One time OAuth Code.
And then you need to use that Code in the https://webexapis.com/v1/access_token API request as documented here - https://developer.webex.com/create/docs/integrations#getting-an-access-token
I've also attached a screenshot from POSTMAN showing you can get it done.
3- Similarly , how to generate "Access Token" on behalf of all users.
You can't generate the token on behalf of all Users, every User has to make this above API request as shared in the screenshot and first generate the OAuth Code and then they all can use the same Integration's details like clientId, clientSecret and other parameters.
Only the one time OAuth code will change User to User.
Just to mention, if you've a requirement to generate the token by each User at various times of events, then you should go with Webex integration authorization technique.
Because for Service Apps, you can't generate tokens for different users. The token can only be generated by the owner of the Service App only and use it inside the code.
Also please note, an access token is only valid for 14 days and a refresh token is valid for 90 days.
Once the access token is expired, you can use the existing refresh token for that User to generate a new access token and steps are shared here - https://developer.webex.com/create/docs/integrations#using-the-refresh-token
This technique is same for Webex integration as well as for Service App.
Here is a screenshot regarding how to do it from POSTMAN -
And once the Access token is generated from Refresh token, the new Access token lifetime would also be 14 days and the existing refresh token's lifetime would be refreshed to 90 days as well. This way you can keep using the same Refresh token forever.
If you want a codebase demo to implement this Webex Integration methodology, you can find it in this article with the detailed explanation and the demo is in Python Flask framework - https://developer.webex.com/blog/real-world-walkthrough-of-building-an-oauth-webex-integration
Hope this helps!
Please let us know for any further assistance or queries going ahead.
Regards!
Sandip
11-26-2025 12:09 AM
Hi Sandip,
Thanks for detailed reply.
Authorization code and token generation part is very much clear to me, also refresh token and validity of token & refresh token.
As already explained we are developing telephony/CTI connector for CRM(SFDC/ServiceNow/MSCRM), so for this kind of application should we register our connector application as "Service App" and generate token. Will this registered Service App able to initiate call on Behalf of any WebEx user once authorize/approved by administrator?
Thanks & Regards,
Umesh
11-26-2025 02:23 AM - edited 11-26-2025 03:15 AM
Let me give your one feedback about my application.
Case 1- I tried with Integration app and tested for one WebEx user by clicking on Dial button in our app. The call was initiated from User's Webex client and our application was able to receive events for Answering/Disconnect. In this Webex user has authorize for access and token were generated after authorization.
Case 2- Today I registered our application as "Service App" and authorize that application from WebEx Admin login. We are able to generate Access Token & Refresh Token. Our Application Webhook module is able to register WebHook using the Service App access token but getting following error when call "Dial" REST API -
{"destination":"3262"}
Response = InboundJaxrsResponse{context=ClientResponse{method=POST, uri=https://webexapis.com/v1/telephony/calls/dial, status=403, reason=Forbidden}}
Response = 403
Response = Forbidden
Can you please let us know if Service App is supported for WebEx Calling Call Controls REST API?
Are we missing anything in our application configuration?
We are using WebEx Sandbox.
Following are the access rights and also authorized -
Finaly, we found that Service Apps are not supported for Webex Calling Call Controls REST API -
Thanks & Regards,
Umesh
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