Posts tagged with google-docs-api

As the title suggests, I want to build a query which returns the date when the total cost of an account was greater than or equal to a certain value.

So far, I have made this: $query = 'SELECT campaign.start_date FROM campaign WHERE metrics.cost_micros >= 700 LIMIT 1'; which isn't right, as it doesn't return the date where $700 were spent, but rather the start date of the campaign that surpassed $700.

Any help or insights are appreciated. Thank you in advance

I tried: $query = 'SELECT segments.date FROM customer WHERE metrics.cost_micros >= 700';. Doesn't work due to segments.date needing to be in the WHERE clause, as well as other variations of this query as well as reading the Google Ads API documentation.

I'm using google adwords api to create campaigns and ads. I keep getting this error :Unauthorized CREATE operation in invoking a service's mutate method. I'm using a manager account. I tried with a test account and it was working but with my manager account it doesnt. PS : My developer token has a basic access.

 const client = new GoogleAdsApi({   client_id: req.headers["client_id"],   client_secret: req.headers["client_secret"],   developer_token: req.headers["developer_token"], }); const customer = client.Customer({   customer_id: req.headers["customer_id"],   refresh_token: req.headers["refresh_token"], });   const ad_group_ad = [     {       ad: {         responsive_display_ad: {           accent_color: req.body.pubGads.couleurs_perso,           main_color: req.body.pubGads.couleurs_perso,           marketing_images: marketing_images_tab.map((element) => {             return {               asset: element,             };           }),           square_logo_images: square_logo_images_tab.map((element) => {             return {               asset: element,             };           }),           square_marketing_images: square_marketing_images_tab.map(             (element) => {               return {                 asset: element,               };             }           ),           headlines: headlinesTab.map((element) => {             return {               text: element,             };           }),           long_headline: {             text: req.body.pubGads.titre_long,           },           descriptions: descriptionsTab.map((element) => {             return {               text: element,             };           }),           business_name: req.body.pubGads.nom_entreprise,           call_to_action_text: req.body.pubGads.texte_incitation,         },         final_urls: req.body.pubGads.url_finale.split(","),       },       ad_group: adGroupResults.results[0].resource_name,       status: enums.AdGroupAdStatus.PAUSED,     },   ];   const ad_group_ad_result = await customer.adGroupAds.create(ad_group_ad); 

Does google ads API work?

When I click the google ads API document, I get "Service Unavailable".

  1. Where can I see this API status, and when it's back?
  2. Can I use this API to create custom audience/lookalike audience just like facebook ads API?
  3. (Additional) I am NodeJS developer, is there any library that is already working well with ads API?

Thank you so much!