4. Create Oauth credentials - NoSubstitute/userDelegationWebApp GitHub Wiki
After clicking the Create credentials button on the Gmail API page, you are taken to the APIs and services page and are asked a number of questions.
-
Credential type. Select Gmail API. Select User data. Click Next.
-
OAuth consent screen - Provide App information App name: Enter the name of your script, app or whatever you are creating. This is visible to the user when authorising your app for the first time. User support email: Select an email address where users can contact you for support. Developer contact information: Google may reach out to this address. You can type in any address you wish to use here. Upload this app logo.
Save and continue
-
Scopes It's actually not absolutely necessary to add scopes here, unless you are creating an addon, then you must, as that will be part of your addon verification process. If you're only ever going to use your script as a standalone or embedded script, it's not absolutely necessary. You can also add the scopes at a later date, if you need. Save and continue
-
OAuth Client ID Application type: Select Web application. Name: Again write the name of your app. (This Oauth client name is only visible to you, so if you need, you can name it differently.) Authorised JavaScript origins: Click Add uri and paste
https://script.google.com
Authorised redirect URIs: Click Add uri and paste the code belowhttps://script.google.com/macros/d/{PROJECT KEY}/usercallback
Replace {PROJECT KEY} with the project ID of your script, which you can find on the Project settings page in the script editor.Then click CREATE.
-
Your credentials You are offered to download your credentials, but you don't have to as these are not the credentials we will use in secrets.gs. DONE