Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GodziLaravel's avatar

How to extend bearer life time in a 3rd party API restful

Hello ,

I'm working on a project to consume the webex(cisco) API,

In the documentation : https://developer.webex.com/docs/integrations#getting-an-access-token

the Bearer token has a limite expire time:

{
 "access_token":"ZDI3MGEyYzQtNmFlNS00NDNhLWFlNzAtZGVjNjE0MGU1OGZmZWNmZDEwN2ItYTU3",
 "expires_in":1209600, //seconds
 "refresh_token":"MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTEyMzQ1Njc4",
 "refresh_token_expires_in":7776000 //seconds
}

My question : how is it possible to make it available forever ?

Thanks .

0 likes
1 reply
automica's avatar

@godzilaravel in the Webex docs it says the following about this:

—- Using the Refresh Token Using access tokens that are short-lived and requiring that they periodically be refreshed helps to keep data secure. If the access token is ever compromised, the attacker will have a limited time in which to use it. If a refresh token is compromised, it is useless to the attacker because the client ID and secret are also required to obtain a new access token.

To refresh the access token, issue a POST to https://webexapis.com/v1/access_token —-

You won’t be able to make the token last indefinitely but if it does expire it’s easy to refresh

Please or to participate in this conversation.