Refreshing Access Tokens

Using this template helps us debug your issues more effectively :slight_smile:

Description
I am Unable to refresh the access token and getting an error 401.Can you please look into it why the error is happening

Error
https://zoom.us/oauth/token?grant_type=refresh_token&refresh_token=eyJhbGciOiJIUzUxMiIsInYiOiIyLjAiLCJraWQiOiJlNDNlMGJmYi0xY2VhLTQ4ODUtOWE2MS04MmU2ZTUyYjY4MTgifQ.eyJ2ZXIiOjcsImF1aWQiOiJmM2JmNWJkYjIyOWUwM2RmZWMzMmQzYzkwNDkyYTU5MyIsImNvZGUiOiJ5bmt1aXQ1NzZ3XzlfaEhSZDdDU1lhS08tMUFwM3ptTVEiLCJpc3MiOiJ6bTpjaWQ6Q3cxZ0tCYzJTN2lmZ0ZpNmlNTHFFQSIsImdubyI6MCwidHlwZSI6MSwidGlkIjowLCJhdWQiOiJodHRwczovL29hdXRoLnpvb20udXMiLCJ1aWQiOiI5X2hIUmQ3Q1NZYUtPLTFBcDN6bU1RIiwibmJmIjoxNjUxODA4MzAyLCJleHAiOjIxMjQ4NDgzMDIsImlhdCI6MTY1MTgwODMwMiwiYWlkIjoidUdHLTZ0XzVRc1N0UXZDQ1JfaUNxUSIsImp0aSI6ImUyOTIwOGFiLWQwMzMtNDNlMS1iYTYyLWJkNGFlY2ViNjg5NCJ9.06COP-XuGXCohJ5aJNAXwtN7K9t-v90AwKP7Jmd1h8L6fEcdjRVw5ukP9KCs3OU9gVpmt_hoMS9ciDxRWUnMPQ
response <Response [401]>

How To Reproduce (If applicable)
Steps to reproduce the behavior:
def refreshZoomToken(self):
“”“Refresh access token”""
#print(self.client_id)
#b64encoded = base64.b64encode(self.get_userpass)
encoded_u = base64.b64encode(self.get_userpass.encode()).decode()
# print(encoded_u)
with open(self.get_tokenfile, ‘r’) as f:
token_json = json.loads((f.read()))
refresh_token = token_json[‘refresh_token’]
#print(refresh_token)
header = {‘Authorisation’ : ‘Basic %s’ % encoded_u, ‘content-type’:‘application/x-www-form-urlencoded’}
payload = (“grant_type=refresh_token&refresh_token={0}”).format(refresh_token)
response = requests.post(self.token_url, params=payload, headers=header)
print(response.request.url)
print(“response”,response)
if response.status_code == 200:
results = json.loads(response.text)
print({} ,format(results))

Hi @meghana_surepalli

Thanks for reaching out to the Zoom Developer Forum and welcome to our community!
Have you been able to follow the steps listed here in our Docs, on how to refresh an access token?

Cheers,
Elisa

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.