Server 2 Server token expiration time

Hi folks,

My server-2-server token is expiring in 10 minutes! Acording to the documentation It should last 1 hour!

in this 10 minutes I can call several apis but after that I get this error:
{
“code”: 124,
“message”: “Invalid access token.”
}

Any tips?

Regards

Hi @MarceloErthal
This is not expected. Access tokens generated with the server to server oauth have an expiration time of 1 hour, but it is important to mention that every time you generate a new token, the previous one gets invalidated.
Can you make sure you are not generating new ones that could be invalidating the one that you are using?

@elisa.zoom,

yes, I only generate the token one time when the process starts. What should I do?

@MarceloErthal
Make sure that you generate a new token every time you are making a request or to use the same token for 1 hours, because creating a new one will invalidate the previous one.
So I would suggest you to generate a token for each call that you want to make or to create different applications so you can have tokens working independently