Skip to content

Instantly share code, notes, and snippets.

@ritik1009
Created September 11, 2022 11:00
Show Gist options
  • Save ritik1009/0c4e545fca502787f9d15f8740b3d2a3 to your computer and use it in GitHub Desktop.
Save ritik1009/0c4e545fca502787f9d15f8740b3d2a3 to your computer and use it in GitHub Desktop.
def get_refresh_token(access_token = ''):
url = graph_url + 'refresh_access_token'
param = dict()
param['grant_type'] = 'ig_refresh_token'
param['access_token'] = access_token
response = requests.get(url=url,params= param)
response = response.json()
access_token = response['access_token']
expires_in = response['expires_in']
return access_token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment