...
Read the folowing data for instruction on how to
Create a Project
Enable the Gmail API for the project
https://developers.google.com/identity/protocols/oauth2/web-server#enable-apis
- Open the API Library: https://console.cloud.google.com/apis/library
- Open the API Library in the Google API Console.
- If prompted, select a project, or create a new one.
- The API Library lists all available APIs, grouped by product family and popularity. If the API you want to enable isn't visible in the list, use search to find it, or click View All in the product family it belongs to.
- Enable the GMAIL API
- Select the API you want to enable, then click the Enable button.
- If prompted, enable billing.
- If prompted, read and accept the API's Terms of Service
...