Using a Google User Account
You can configure the connector to authenticate the connection with a Google user account. This authentication method uses the OAuth 2.0 access and refresh tokens associated with the user account as the credentials.
The access token is transmitted with every API call that the connector makes, and it is required for accessing BigQuery data stores. However, the access token expires after a certain amount of time and must be renewed using the refresh token. If the refresh token is stored in your connection information, the connector automatically uses it to renew access tokens when they expire.
Note:
For more information about OAuth 2.0, see "Using OAuth 2.0 to Access Google APIs" in the Google Identity Platform documentation: https://developers.google.com/identity/protocols/OAuth2.
At minimum, you need to provide the OAuth 2.0 refresh token associated with your account. The connector retrieves and uses an access token based on your specified refresh token.
- If you do not have your refresh token, see Retrieving a Refresh Token.
- If you already have your refresh token, see Providing a Refresh Token.
- If you want to provide a
.json
key file that contains your credentials instead of providing your refresh token directly in your connection information, see Providing a Key File.
Retrieving a Refresh Token
When you authenticate your connection this way, the authentication process provides a temporary confirmation code that you can exchange for an access token and a refresh token.
To configure user account authentication by retrieving a refresh token:
- To access authentication options, open the ODBC Data Source Administrator where you created the DSN, then select the DSN, and then click Configure.
- From the OAuth Mechanism drop-down list, select User Authentication.
- Click Sign In.
- In the browser that opens, type your credentials for accessing your BigQuery data and sign in to your account.
- The connector waits for two minutes (120 seconds) for the sign in to complete. While waiting for the sign in to complete, the configuration dialog will be unresponsive.
- Click Accept, when you are prompted to allow Magnitude Simba Data Connector for BigQuery Client Tools to access your data in Google. The browser will display a message indicating that the dialog successfully retrieved the refresh token.
- The connector automatically populates the field with your refresh token in the dialog with the retrieved token.
Providing a Refresh Token
If you already have your refresh token, then you can provide the token in your connection information without going through the retrieval process described above.
To configure user account authentication by providing a refresh token:
- To access authentication options, open the ODBC Data Source Administrator where you created the DSN, then select the DSN, and then click Configure.
- From the OAuth Mechanism drop-down list, select User Authentication.
- In the Refresh Token field, type the refresh token associated with your user account.
Providing a Key File
As an alternative to providing your refresh token directly in your connection information, you can save the token in a .json
key file and then specify the path to the file in your connection information.
The file must define a JSON object of type authorized_user
containing the refresh token, client ID, and client secret associated with your user account. For example, the .json
key file must be written in the following format:
{
"type": "authorized_user",
"client_id": "[YourClientID]",
"client_secret":"[YourClientSecret]",
"refresh_token":"[YourRefreshToken]"
}
To configure user account authentication by providing a key file:
- To access authentication options, open the ODBC Data Source Administrator where you created the DSN, then select the DSN, and then click Configure.
- From the OAuth Mechanism drop-down list, select Service Authentication.
Note: Although this is a form of user authentication, the key file must be provided using the service authentication options.
- In the Email field, type your user account email ID.
- In the Key File Path field, type the full path to the
.json
key file.