Hi All, I added tap-googleads as an extractor and ...
# troubleshooting
c
Hi All, I added tap-googleads as an extractor and I see that we need the oauth credentials for authentication. I have used the service account way where we get a credentials.json file. I wanted to know if there is a way we can use this for authentication instead of the oauth way. I know the json file authentication is available in google analytics where we can mention the location of file. Is something similar available for google ads too?
a
I believe the google ads auth process is different, have you definitely authenticated with your service account via some other method? You normally need a dedicated set of credentials for your ads manager account.
Copy code
### GOOGLE ADS
TAP_GOOGLEADS_CLIENT_ID='1797...'
TAP_GOOGLEADS_CLIENT_SECRET='GOCS...'
TAP_GOOGLEADS_REFRESH_TOKEN='1//03xo...'
TAP_GOOGLEADS_DEVELOPER_TOKEN='mgc...'
TAP_GOOGLEADS_CUSTOMER_ID='162...'
TAP_GOOGLEADS_LOGIN_CUSTOMER_ID='236....'
Here's what I have configured in my
.env
Wait, you are correct. There is a service account process: https://developers.google.com/google-ads/api/docs/oauth/service-accounts
c
Yeah its allowed. But how exactly do we use this in meltano is what I wanted to know.
r
It's not supported in the tap at the moment. Feel free to open an issue or submit a PR. I foresee some potential complications as we are interacting with the REST API without a client library (i.e. google-ads-python), so we will have to enhance the existing auth logic accordingly: > A service account's credentials, which you obtain from the Google API Console, include a generated email address that is unique, a client ID, and at least one public/private key pair. You use the client ID and one private key to create a signed JWT and construct an access-token request in the appropriate format. Your application then sends the token request to the Google OAuth 2.0 Authorization Server, which returns an access token. The application uses the token to access a Google API. When the token expires, the application repeats the process. > https://developers.google.com/identity/protocols/oauth2#serviceaccount