scriptDaddy
scriptDaddy

Reputation: 182

Google Cloud Platform project with the Gmail API: Create token for Desktop Application

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: enter image description here

I follow the link to unsafe:

enter image description here

and get the link to localhost:

http://localhost:34551/?state=[XXX]&code=[XXX]&scope=https://mail.google.com/ enter image description here

Question: How can I get the app authorized / get the client_secret.json, etc?

Upvotes: 0

Views: 131

Answers (1)

scriptDaddy
scriptDaddy

Reputation: 182

Installing xampp solved the issue. The windows IIS did not work in this case

Upvotes: 1

Related Questions