I am trying to connect to the google ads api using a service account. For analytics there is a good article named Hello Analytics API: Java quickstart for service accounts which explains how to set this up. For Google ads I can't find any documentation online.

So my two questions are:

  1. Is it possible to access the Google Ads API using a service account?
  2. If so, is there something like a Hello Ads API: Java quickstart for service accounts page with information on how to connect to the api with a service account?

UPDATE 2/10

I succeeded in passing the authentication fase. I do get an error when trying to fetch data from the API.

curl.exe --request POST "https://googleads.googleapis.com/v5/customers/******/googleAds:searchStream" --header "Content-Type: application/json"  --header "Authorization: Bearer ******"  --header "developer-token: ******"  --data "{'query': 'SELECT * FROM campaign WHERE segments.date DURING YESTERDAY'}" [{   "error": {     "code": 401,     "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",     "status": "UNAUTHENTICATED",     "details": [       {         "@type": "type.googleapis.com/google.ads.googleads.v5.errors.GoogleAdsFailure",         "errors": [           {             "errorCode": {               "authenticationError": "NOT_ADS_USER"             },             "message": "User in the cookie is not a valid Ads user."           }         ]       }     ]   } } ] 

The google docs say this error is because the account is not associated with an google ads account (https://developers.google.com/google-ads/api/docs/best-practices/common-errors#not_ads_user). The request are being processed by the api, I know this because the request are counted in the google ads api console as errors.

In the Credentials compatible with this API for the google ads Api my service account is listed. I am a little puzzled by the error. The service-account is associated with the google ads account as far as I could tell.

does anybody know if there is a way how to create a label for a keyword using Google Ads API? It can be done using the web interface and apparently it could be done using the Adwords API, but I can't find a way how to do it using Google Ads API so I don't know if it's a feature which they didn't implement or if I'm blind.

Their documentation says

Labels allow you to categorize your campaigns, ad groups, ads, and keywords, and use those categories to simplify your workflow in a variety of ways.

which would suggest that it CAN be done, however below on the same page it states

You can assign labels to your campaigns, customers, ad groups, criteria, or ads.

No word about keywords. I am working with PHP / Laravel and I am using their official php package for the API communication. The package has classes like CampaignLabelOperation, CustomerLabelOperation, AdGroupLabelOperation, etc. but NO "KeywordLabelOperation".

Anybody have a clue if I just can't find it or whatever I could do? Thanks a lot for any help

I am not that experienced with working with the Google dashboards, and the last of couple of days I have been struggling a lot with an issue. I am not sure if this is even possible and how, but reading a lot of documentation left me blurry.

Background: We place a cookiebanner and cookies using Google Tag Manager (GTM) on our website. At this moment we load the 'Google Analytics - Universal Analytics' using GTM. We collect anominized data using GA, and the analytics data is showing up in our GA dashboard and is working perfectly. So far, so good.

Challenge: Now our marketing team wants to use Google Ads to draw people to our website. They also want to track conversion using Google Analytics combined with Google Ads. In the settings of Google Ads, the GA and Google Ads data is linked. According to the GDPR we need to explicitly ask permission to our users to process the data in this way (Targeting/remarketing). Using GTM we now implemented a cookie banner on our website, in which we ask consent about processing the data for marketing purposes. Is it possible to couple this consent question using GTM to enable/disable the link between our anominized GA data and Google Ads? If so, how?

If there are better practice solutions for my issue, I would like to hear :)

Thanks!

Hope you are safe and good for this pandemic time. I am developing some functional to fetch data from google ads using google-ads-node. But for now I met one issue.

Error: 3 INVALID_ARGUMENT: Invalid customer ID '... .... ...'. 

However it is set correctly on ads account. Please understand me messy picture. The code I used like this.

const auth = await authenticateGoogle(`keys/${process.env.GOOGLE_YT3_API_CREDENTIAL_PATH}`, 'installed');   const client = new GoogleAdsClient({     access_token: auth.credentials.access_token,     developer_token: process.env.DEV_TOKEN,     parseResults: true,   });   const service = client.getService("GoogleAdsService", { useStreaming: true });   const request = new SearchGoogleAdsStreamRequest();   request.setQuery(`     SELECT       campaign.resource_name,       metrics.impressions,       segments.date     FROM        campaign     WHERE        segments.date BETWEEN "2019-01-01" AND "2020-01-01"   `);   request.setCustomerId(process.env.CUSTOMER_ID);   const call = service.searchStream(request);     const chunks = [];     call.on("error", err => reject(err));     call.on("data", (chunk) => chunks.push(chunk));     call.on("end", () => resolve(chunks)); 

Would you help me how I can figure out this issue please? Thank you.

I'm using google dialogflow to make a whatsapp chatbot. I need to access firestore which contains sensitive data in other collections. Admin sdk is usually used in cloud functions but since it can access any collection in firestore with ease, i wanted to know if it is safe to use it or should i opt for a different option such as firebase client sdk.

Dialogflow is linked to a third party service (QuickWork) which links my bot to Gupshup to use the whatsapp business api.