I'm testing whatsapp business api image section, it seems like the images available at platform are the ones which are getting displayed and no other images which I pick from s3 bucket or google images.

message = {"type": "image",                                "previewUrl": "https://cdn.shopify.com/s/files/1/0445/8545/1685/products/2_9082b428-a7fa-4648-84b5-b34cc1fea9a1_360x.png",                                "originalUrl": "https://cdn.shopify.com/s/files/1/0445/8545/1685/products/2_9082b428-a7fa-4648-84b5-b34cc1fea9a1_360x.png",                                "caption": "some caption",                                "filename": "Sample.jpeg"} 

headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/x-www-form-urlencoded', 'apikey': 'mykey', 'cache-control': 'no-cache', }

the above used url doesn't seem to be displayed in chat whereas https://www.buildquickbots.com/whatsapp/media/sample/png/sample01.png comes fine

I am using google-ads-api module in nodejs to connect with Google Ads API.

I am using this code block to get Customer

const customer = client.Customer({     customer_id: 'XXX-XXX-XXXX',     refresh_token: refreshToken, }) 

I have used XXX-XXX-XXXX, XXXXXXXXXX, XXXX-XXX-XXX format for customer_id but still it is returning this error

GoogleAdsFailure {   errors: [     GoogleAdsError {       error_code: [ErrorCode],       message: "Invalid customer ID ''."     }   ],   request_id: 'OcUdfalh_N0U4hTJUd6c6g' } 

My requirement is to send whatsapp message from the web page. So, it should be a single page which will have fields To Mobile number, message and send button.

I found the documentation from facebook that we need to get whatsapp business api for this. I also see some other tools like twilio to achieve this. It is just confusing that, If we can achieve it using whatsapp business api itself, why we require twilio So, My question here is, Is twilio or other third party tools really require to access whatsapp api.

Note: i am planning to do this implementation with node js.

Please clarify.

I'm trying to pull data from my Google Ads account using their API. I'm using Python

In the code example there is a query where I can specify the date range from which I want to collect results from my campaign.

I would like to dynamically change de date everyday and run the script to get data from the previous day.

My idea was to create a variable with the previous day date in the format Google API is requiering it, named "yesterday".

But I don't know how to use this variable into the query

Here's a part of the code :

import argparse import sys from google.ads.googleads.client import GoogleAdsClient from google.ads.googleads.errors import GoogleAdsException from datetime import * yesterday_date = date.today() - timedelta(days=1) yesterday = yesterday_date.strftime("%Y-%m-%d") def main(client, customer_id): ga_service = client.get_service("GoogleAdsService") query = """     SELECT       campaign.id,       campaign.name,       metrics.cost_micros,       campaign.status     FROM campaign     WHERE segments.date = '2021-08-19'         """ # Issues a search request using streaming. response = ga_service.search_stream(customer_id=customer_id, query=query) for batch in response:     for row in batch.results:         print(             f"Campaign with ID {row.campaign.id}, status is {row.campaign.status}, cost is {row.metrics.cost_micros} and name "             f'"{row.campaign.name}" was found.'         ) 

I would like to do something like this :

WHERE segments.date = yesterday 

I've tried to use sqlite3 library, to use cursor.execute() but I don't know how to use them properly.

I'm a beginner so the answer might be very easy.

Hope you all are doing well. I am new working with Google ads api. I have to retrieve information regarding keywords i.e how many people searched certain keywords , how many clicks and so on... so I have created a manager account on Google ads and under that I have created client account. In client account I have added keywords under keyword planner and I am getting all information mentioned above but I want to get it through REST API in python.

I have everything needed to access API: (Developer token login_customer_id Client ID Client Secret refresh token) I have given this information in the .yaml file. and I assume login_customer_id is the manager account id. Below is the code to access all the keywords information. here I have given the client_idfrom which I want to access keywords information.

import argparse import sys from google.ads.googleads.client import GoogleAdsClient from google.ads.googleads.errors import GoogleAdsException

def main(client, customer_id): ga_service = client.get_service("GoogleAdsService")

query = """     SELECT       campaign.id,       campaign.name,       ad_group.id,       ad_group.name,       ad_group_criterion.criterion_id,       ad_group_criterion.keyword.text,       ad_group_criterion.keyword.match_type,       metrics.impressions,       metrics.clicks,       metrics.cost_micros     FROM keyword_view WHERE segments.date DURING LAST_7_DAYS     AND campaign.advertising_channel_type = 'SEARCH'     AND ad_group.status = 'ENABLED'     AND ad_group_criterion.status IN ('ENABLED', 'PAUSED')     ORDER BY metrics.impressions DESC     LIMIT 50""" # Issues a search request using streaming. search_request = client.get_type("SearchGoogleAdsStreamRequest") search_request.customer_id = customer_id search_request.query = query response = ga_service.search_stream(search_request) for batch in response:     for row in batch.results:         campaign = row.campaign         ad_group = row.ad_group         criterion = row.ad_group_criterion         metrics = row.metrics         print(             f'Keyword text "{criterion.keyword.text}" with '             f'match type "{criterion.keyword.match_type.name}" '             f"and ID {criterion.criterion_id} in "             f'ad group "{ad_group.name}" '             f'with ID "{ad_group.id}" '             f'in campaign "{campaign.name}" '             f"with ID {campaign.id} "             f"had {metrics.impressions} impression(s), "             f"{metrics.clicks} click(s), and "             f"{metrics.cost_micros} cost (in micros) during "             "the last 7 days."         ) # [END get_keyword_stats] 

if name == "main":

googleads_client=GoogleAdsClient.load_from_storage("C:\Users\AnoshpaBansari\PycharmProjects\GoogleAPI\src\creds\googleads.yaml")

parser = argparse.ArgumentParser(     description=("Retrieves a campaign's negative keywords.") ) # The following argument(s) should be provided to run the example. #parser.add_argument(  #   "-c",   #  "--customer_id",    # type=str,     #required=True,     #help="The Google Ads customer ID.", #) #args = parser.parse_args() try:     main(googleads_client, "----------") except GoogleAdsException as ex:     print(         f'Request with ID "{ex.request_id}" failed with status '         f'"{ex.error.code().name}" and includes the following errors:'     )     for error in ex.failure.errors:         print(f'\tError with message "{error.message}".')         if error.location:             for field_path_element in error.location.field_path_elements:                 print(f"\t\tOn field: {field_path_element.field_name}")     sys.exit(1) 

but when I run the code I receive this error. I don't know what I am doing wrong.. Can anyone please help? enter image description here