Reputation: 182
Scope: I want to access my Gmail via python and the Gmail API on Raspbery pi /Raspian or Windows 10.
Following the official guide from Google I created a project and enabled the Gmail API, Authorization credentials for a desktop application according to this guide for Desktop app, downloaded it and renamed it to credentials.json
when running quickstart.py I get as expected:
>>> # get the Gmail API service
... service = gmail_authenticate()
Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=[XXX.apps.googleusercontent.com]&redirect_uri=http%3A%2F%2Flocalhost%3A34551%2F&scope=https%3A%2F%2Fmail.google.com%2F&state=[xxx]&access_type=offline
When opening the URL in the browser:
I follow the link to unsafe:
and get the link to localhost:
http://localhost:34551/?state=[XXX]&code=[XXX]&scope=https://mail.google.com/
Question:
How can I get the app authorized / get the client_secret.json
, etc?
Upvotes: 0
Views: 131
Reputation: 182
Installing xampp solved the issue. The windows IIS did not work in this case
Upvotes: 1