Skip to content

Instantly share code, notes, and snippets.

@vershimajr
Created August 30, 2019 09:49
Show Gist options
  • Save vershimajr/232c3bb6d5b1e9c12bd6d017ffaaed51 to your computer and use it in GitHub Desktop.
Save vershimajr/232c3bb6d5b1e9c12bd6d017ffaaed51 to your computer and use it in GitHub Desktop.
Refresh Auth Token
import requests
import json
refresh_url = 'https://api.temporal.cloud/v2/auth/refresh'
headers = {'Cache-Control': 'no-cache', 'Authorization':'Bearer '+AUTH_TOKEN_STRING}
r = requests.get(refresh_url, headers=headers)
expire = r.json()['expire'] #new expire time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment