Getting a Refresh Token
This guide covers the OAuth 2.0 refresh token mechanism.
Last updated
This guide covers the OAuth 2.0 refresh token mechanism.
Last updated
© 2024 ProcessMaker, Inc. All Rights Reserved. Except as otherwise permitted by ProcessMaker, this publication, or parts thereof, may not be reproduced in any form, by any method, for any purpose.
This guide walks you through the steps of refreshing an access token for making RESTful API calls to ProcessMaker. Access tokens typically have a limited lifespan, and once they expire, they need to be refreshed using a refresh token. This guide assumes you already have a refresh token. If not, refer to the "How to Get an Access Token" guide.
Before starting, ensure you have the necessary Python libraries installed. You'll need requests
for making HTTP requests.
You can install it via pip:
Use the following Python code to refresh your access token:
Don't forget!
Replace:
<your-instance>
with your actual ProcessMaker instance URL.
<your-refresh-token>
with the refresh token you received when you first obtained your access token.
<your-client-id>
and <your-client-secret>
with the client ID and secret of your application.
After executing the script, you should receive a new access token and possibly a new refresh token. Store these securely, as you'll need the access token for future API requests and the refresh token for future token refreshes.
Refreshing your access token is an essential step in maintaining uninterrupted access to the ProcessMaker API. By using Python and the requests
library, you can easily and efficiently refresh your token. Always ensure you handle your tokens securely, as they are vital for maintaining secure communication with the API.