This section guides you through the process of generating access tokens and refresh tokens that are used to authenticate to Google BigQuery when OAuth 2.0 is set as the authentication method (AuthenticationMethod=oauth2).
To generate an access token and a refresh token from Google Console:
2. Enter your login credentials; then, click Next.
3. On the left pane, click OAuth consent screen.
4. On the OAuth consent screen, enter the following details; then, click Save:
Application name
Support email
Scopes for Google APIs
Authorized domains
Application Homepage link
Application Privacy Policy link
5. On the left pane, click Credentials. Next, from the Create credentials drop-down list, select OAuth client ID.
6. The Create OAuth client ID screen appears. Select Other as your Application type, enter your application's name, and then click Create.
.
7. OAuth client window appears. Copy and save your client ID and client secret from the corresponding fields. You will need them later in this procedure. Note that they can also be accessed from the Credentials screen, if necessary.