From d07b33bc2e8f4e5eb73a7c8be79cbbae23009c83 Mon Sep 17 00:00:00 2001 From: Antoine Leclair Date: Sat, 10 Sep 2016 11:55:52 -0400 Subject: [PATCH] Use POST instead of GET when obtaining Live access_token --- velruse/providers/live.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/velruse/providers/live.py b/velruse/providers/live.py index 4f9f0a9..124be89 100644 --- a/velruse/providers/live.py +++ b/velruse/providers/live.py @@ -94,14 +94,13 @@ def callback(self, request): provider_type=self.type) # Now retrieve the access token with the code - access_url = flat_url( - 'https://oauth.live.com/token', + r = requests.post('https://oauth.live.com/token', dict( client_id=self.consumer_key, client_secret=self.consumer_secret, redirect_uri=request.route_url(self.callback_route), grant_type="authorization_code", - code=code) - r = requests.get(access_url) + code=code), + ) if r.status_code != 200: raise ThirdPartyFailure("Status %s: %s" % ( r.status_code, r.content))