Refreshing Tokens

Exchange your refresh tokens for new access tokens.

We'll cover the following

Refresh access tokens

When requesting an access token from HubSpot, the response includes both an access token and a refresh token. Access tokens expire after thirty minutes have passed. The refresh token can then be exchanged for new access and refresh tokens, upon which the old refresh token also becomes invalid.

If you end up with an expired access token, you can run the code below to generate new access and refresh tokens.

Note: Don't forget to save both the ACCESS_TOKEN and REFRESH_TOKEN after running the code below!

Get hands-on with 1200+ tech skills courses.