tested refresh TP token
This commit is contained in:
@@ -94,7 +94,7 @@ def custom_exception_handler(exc,message):
|
||||
return res
|
||||
|
||||
# Refresh ST token using refresh token
|
||||
def do_refresh_token(refreshtoken,access_token):
|
||||
def do_refresh_token(refreshtoken):
|
||||
client_auth = requests.auth.HTTPBasicAuth(TP_CLIENT_KEY, TP_CLIENT_SECRET)
|
||||
post_data = {"grant_type": "refresh_token",
|
||||
"client_secret": TP_CLIENT_SECRET,
|
||||
@@ -104,7 +104,8 @@ def do_refresh_token(refreshtoken,access_token):
|
||||
headers = {'user-agent': 'sanderroosendaal',
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'authorization': 'Bearer %s' % access_token}
|
||||
}
|
||||
|
||||
|
||||
url = "https://oauth.sandbox.trainingpeaks.com/oauth/token"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user