I try to build below:
by following: this steps
and i use oauth playground to generate auth code and load it into my server manually (for testing purpose)
i did put in Authorised redirect URIs
: https://developers.google.com/oauthplayground
and try to get my auth code this way.
then i load my auth code generated from playground to my REST API Server (http://localhost:5000/api/user/blah) and use this python snippet to exchange the code:
try:
credentials = client.credentials_from_clientsecrets_and_code(
app.config.get('GG_APP_SECRET'),
['https://www.googleapis.com/auth/plus.me', 'profile', 'email'],
req_gg_code)
except Exception as e:
log.info('>>>>> Exception: %s <<<<<', e)
return generate_response(code=400, error=False, type='Fail', message=str(e))
and the result: i keep receive error:
oauth2client.client - INFO - Failed to retrieve access token: b'{\n "error" : "redirect_uri_mismatch"\n}'
my REST API server doesnt have any interface, it will just receive feed from other client (e.g. mobile app) and it doesnt have any redirect uri.
so what's wrong here? what is the correct configuration of my web client id?
at the moment i'm using web client id (type: web application) with redirect uri: https://developers.google.com/oauthplayground