API seems to work ok
This commit is contained in:
@@ -85,9 +85,9 @@ def get_token(code):
|
||||
client_auth = requests.auth.HTTPBasicAuth(TEST_CLIENT_ID, TEST_CLIENT_SECRET)
|
||||
post_data = {"grant_type": "authorization_code",
|
||||
"code": code,
|
||||
"redirect_uri": TEST_REDIRECT_URI,
|
||||
"client_secret": TEST_CLIENT_SECRET,
|
||||
"client_id":TEST_CLIENT_ID,
|
||||
"redirect_uri": "http://localhost:8000/rowers/test_callback",
|
||||
"client_secret": "aapnootmies",
|
||||
"client_id":1,
|
||||
}
|
||||
headers = {'Accept': 'application/json',
|
||||
'Content-Type': 'application/json'}
|
||||
@@ -99,12 +99,12 @@ def get_token(code):
|
||||
data=json.dumps(post_data),
|
||||
headers=headers)
|
||||
|
||||
print response.text
|
||||
token_json = response.json()
|
||||
thetoken = token_json['access_token']
|
||||
expires_in = token_json['expires_in']
|
||||
refresh_token = token_json['refresh_token']
|
||||
|
||||
|
||||
return [thetoken,expires_in,refresh_token]
|
||||
|
||||
def make_authorization_url(request):
|
||||
|
||||
Reference in New Issue
Block a user