cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1073
Views
1
Helpful
5
Replies

How to perodic get myself WebEx Personal Token

wanlwang
Cisco Employee
Cisco Employee

Dear,

 

I would like to send some messages with 10-30mins intervals by myself Webex account, but the personal access token has a limited duration is 12 hours, so I must copy the personal access token manually every 12 hours, could you help to tell me how to get the personal access token, e.g. API or other ways? By the way, would you please loop me to a ebex developer discussion group?

1 Accepted Solution

hazeena farook
Cisco Employee
Cisco Employee

Kindly visit https://developer.webex.com/docs/getting-started, once logged in, you will find your "Personal Access Token or the Bearer token" which can be used to interact with the Webex API as yourself. 
This token has a short lifetime - only 12 hours after logging into this site-so it shouldn't be used outside of app development. When using this token, any actions taken through the API will be done as you.

To perform actions on behalf of someone else or have a longer lifetime than the 12 hours Personal Access Token, you'll need a separate access token that you obtain through an OAuth authorization grant flow, check the Integration documentation https://developer.webex.com/docs/integrations for generating OAuth access tokens. 
A step by step guide on how to create one can be found here: https://developer.webex.com/blog/real-world-walkthrough-of-building-an-oauth-webex-integration .

View solution in original post

5 Replies 5

hazeena farook
Cisco Employee
Cisco Employee

Kindly visit https://developer.webex.com/docs/getting-started, once logged in, you will find your "Personal Access Token or the Bearer token" which can be used to interact with the Webex API as yourself. 
This token has a short lifetime - only 12 hours after logging into this site-so it shouldn't be used outside of app development. When using this token, any actions taken through the API will be done as you.

To perform actions on behalf of someone else or have a longer lifetime than the 12 hours Personal Access Token, you'll need a separate access token that you obtain through an OAuth authorization grant flow, check the Integration documentation https://developer.webex.com/docs/integrations for generating OAuth access tokens. 
A step by step guide on how to create one can be found here: https://developer.webex.com/blog/real-world-walkthrough-of-building-an-oauth-webex-integration .

Hello there, I have already tried this and the instructions in the walkthrough provided lead to a login page, which is rather redundant if the purpose is not needing to insert the new access_token every time. I'd like to schedule meetings on a regular basis (from the same account) via the /meetings APIs. Is there a solution to that that doesn't involve a login page/refreshing access_tokens manually?

For an application to perform operations on behalf of a user - i.e. you - you will need to register/implement an Integration with an OAuth2 authentication flow involving a manual user-login - at least once.
With the first authentication sequence, you will have a current/usable auth token, as well as a refresh token.  This refresh token can be renewed indefinitely, as long as you don't let it expire.  However, that requires either that the application run at least once before expiry (typically 60 days), and/or be continuosly running to periodically refresh the token.  If the refresh token is allowed to expire, then a manual OAuth2 sequence will need to again be performed.
This blog post explores using the Vault secret management solution, which can automatically update such tokens with a plugin: https://blogs.cisco.com/developer/webexapioauthtokenhashicopvault01

Hi @dstaudt did you mean in the above reply by "requires either that the application run at least once before expiry (typically 60 days)", that the application needs to refresh the tokens before expiry (90 days) or you meant that the application needs to use the access token at least once every 60 days?

Your application just need to use the refresh token to generate a new access token before the refresh token expires, that way the expiry timer on the refresh token resets back to 90 days. You don't actually need to use the new access token to make any API requests. If you don't use the refresh token within 90 days then it will expire and you'd need to go through the full OAuth flow again in order to generate a new access and refresh token.

Getting Started

Welcome to the Webex Community. This is your home to ask questions, share knowledge, and attend live webinars.