google app engine - OAuth2WebServerFlow works from localhost, but not from real AppEngine Instance -


I'm using OAuth2WebServerFlow to get to use with the user's credentials Sheets GData / Spreadsheet API. I have been having a hard time diagnosing the problem because it works locally while running the application while it works without any losslessness.

This snippet that I am using to obtain authorization URL:

  CLIENT_ID = 'my-ID' CLIENT_SECRET = 'Meri Gupt' Scope = 'https : //spreadsheets.google.com/feeds' flow_object = OAuth2WebServerFlow (CLIENT_ID, CLIENT_SECRET, Scope, redirect_uri = self.REDIRECT_URL, access_type = 'line') authorize_url = flow_object.step1_get_authorize_url ()  

Locally (using redirects = 'http: // localhost: 8080 / this path /' ) generates this:

https: // accounts.google.com/o/oauth2/auth?redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fthis-path%2F&scope=https% 3 A% 2F% 2Fspreadsheets.google.com% 2Ffeeds & amp; Client_id = My ID & amp; Response_type = In the code & amp; Access_type = online

in the Live Application Engine (using redirect = 'http: //my-app.appspot.com/this-path/' ) This creates:

https://accounts.google.co M / o / OAuth2 / Certification scope = https% 3A% 2F% 2Fspreadsheets.google.com% 2Ffeeds & amp; ? Redirect_uri = http% 3A% 2F% 2Fmy-app.appspot.com% 2Fthis- Path% 2F & amp; Response_type = In the code & amp; Client_id = my-id and access_type = Online

The application configuration looks like this:

  Client ID: I-ID email address: My ID @ developer. Gserviceaccount.com Client SECRET: My Secret Redirect URIs: http: // localhost: 8080 / http://my-app.appspot.com https://my-app.appspot.com http: // my-app .appspot .com / this-path https://my-app.appspot.com/this-path http://my-app.appspot.com/this-path/ https://my-app.appspot.com/ Path / javascript native http: // localhost: 8080 http://my-app.appspot.com  

I'm going to the locally generated version of the URL Permit application Urwk can offer but I'm on my live applications generated by URL get a 401 is "Error: Akshm_clain Oath client was turned off."

I think it's probably just a configuration error, maybe it's the fact that it works locally just a red herring? Maybe I can always be able to give them local rights? I'm really out of ideas on this and any help would be appreciated.

In the application configuration, redirect URLs oauth2callback should be right, because my Understand that oauth2callback authorizes the token at the end of the flow, see the document [1].

[1] OAuth 2.0 :


Comments