Skip to content

Instantly share code, notes, and snippets.

@dubeyji10
Created May 16, 2022 11:09
Show Gist options
  • Save dubeyji10/48ba7aad986647a5c86072aaa5700e5d to your computer and use it in GitHub Desktop.
Save dubeyji10/48ba7aad986647a5c86072aaa5700e5d to your computer and use it in GitHub Desktop.
generating new access tokens from refresh token
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)
@dubeyji10
Copy link
Author

refresh token example

refresh_token_colored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment