Configuring Authentication
You can configure the Simba Google Ads ODBC Connector to authenticate the connection to the database using one of several methods. For more information, see the following sections:
- Configuring Authentication With an Access Token
- Configuring Authentication With Your Ads Credentials
- Configuring Authentication With Service Authentication
Configuring Authentication With an Access Token
If you already have a valid access token, specify it in your DSN so that the connector can use it to authenticate the connection.
To configure authentication with an access token:
- To access authentication options, open the ODBC Data Source Administrator where you created the DSN, select the DSN, and then click Configure.
- In the Developer_Token field, type the developer token associated with the manager account that you use to grant access to the Ads API.
- From the Method drop-down list, select Access Token.
- In the Access Token field, type your access token.
- To save your settings and close the DSN Setup dialog box, click OK.
Configuring Authentication With Your Ads Credentials
You can configure the connector to use OAuth 2.0 to authenticate your connection.
To authenticate using OAuth 2.0:
- To access authentication options, open the ODBC Data Source Administrator where you created the DSN, select the DSN, and then click Configure.
- In the Developer_Token field, type the developer token associated with the manager account that you use to grant access to the Ads API.
- From the Method drop-down list, select OAuth_2.0.
- In the Client Id field, type the client ID associated with the Ads application.
- In the Client Secret field, type the client secret.
- In the Scope field, type a comma-separated list of OAuth scopes for the access token.
- In the Redirect Uri field, type the OAuth 2.0 base redirect URI, which is used to generate the completed redirect URI and the authorization URL.
- Click Get Access Token. An access token and refresh token are automatically generated and inserted into the appropriate fields in the DSN Setup dialog box.
- To save your settings and close the DSN Setup dialog box, click OK.
Providing a Key File
If you have a refresh token, as an alternative to OAuth 2.0 authentication, 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 OAuth 2.0 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 Method drop-down list, select Service Authentication.
- 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.
Note:
Although this is a form of OAuth 2.0 authentication, the key file must be provided using the service authentication options.
Configuring Authentication With Service Authentication
You can configure the connector to use the Ads service account to authenticate the connection.
To configure authentication with Service Authentication:
- To access authentication options, open the ODBC Data Source Administrator where you created the DSN, select the DSN, and then click Configure.
- In the Developer_Token field, type the developer token associated with the manager account that you use to grant access to the Ads API.
- From the Method drop-down list, select Service Authentication.
- In the Email field, type the email ID associated with the service account.
- In the Key File Path field, type the full path of the plain text JSON object or
.p12
or.json
key file that is used to authenticate the service account email address. - To save your settings and close the DSN Setup dialog box, click OK.