Created
May 16, 2022 11:09
-
-
Save dubeyji10/48ba7aad986647a5c86072aaa5700e5d to your computer and use it in GitHub Desktop.
generating new access tokens from refresh token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
''' | |
16 may 2022 | |
create new client for new tokens | |
-> try new scopes for insert | |
-> tokens expire after 1hr so refresh and create new access tokens | |
''' | |
url = "https://accounts.zoho.in/oauth/v2/token?" | |
payload={ | |
'client_id': 'your-client-id', | |
'client_secret': 'your-client-secret', | |
'refresh_token': 'your-refresh-token', | |
'grant_type': 'refresh_token' | |
} | |
files=[ | |
] | |
headers = {} | |
response = requests.request("POST", url, headers=headers, data=payload, files=files) | |
print(response.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
refresh token example