[BangPypers] Stack Overflow Questions Tags Users Badges Unanswered Ask Question google oauth login Python: “Invalid parameter value for redirect_uri: Missing scheme: None”

VIMAL K vimal.k at ieee.org
Fri Jul 25 12:42:24 CEST 2014


This is my code:

flow =
OAuth2WebServerFlow(client_id='XXXXXX',client_secret='XXXXXXXXX',scope='
https://www.googleapis.com/auth/userinfo.email',redirect_uri='
https://XXXXXXXX.com/oauth2callback')
log.debug(flow.__dict__)
if not self.request.get("code"):
    auth_uri = flow.step1_get_authorize_url()
    log.debug("the link " + auth_uri)
    self.redirect(auth_uri)
else:
    code = self.request.get("code")
    log.debug("code=>"+str(code))
    credentials = flow.step2_exchange(str(code))
    http = httplib2.Http()
    http = credentials.authorize(http)
    log.info('authorisation completed')
    service = build('gmail', 'v2', http=http)
    self.render_json(service.__dict__)
After all this, code. i am getting an error as below:

Failed to retrieve access token: {
  "error" : "invalid_request",
  "error_description" : "Invalid parameter value for redirect_uri: Missing
scheme: None"
}
Can anyone help me out. Stuck for a 2 days on this.


More information about the BangPypers mailing list