console.cloud.google.com
. Click on the tab shown in the image below.create project
option.assignment
. Click on enable APIs and services. Follow the arrow.From the result. Select GMAIL API. Click on Enable. To enable GMAIL API. From here, you’ll be redirected back to API and services screen.
From the left hand side menu. Select Credentials. After selecting credentials. Configure consent screen. Follow the arrow.
'https://www.googleapis.com/auth/gmail.modify'
Once all details are saved. Go back to credentials. Click on create credentials. And, select OAuth Client ID. From the dropdown. Select type of application as dekstop app.
On the next screen it will ask you to give name to the credentials. Once done. It will show client ID and client screat key. On the same screen there is option to download the credentials json. Download the file.
Rename the downloaded file to credentials.json
and move it to
your project folder i.e email_client
.