I'm trying to make a call to the Google ADS API through the ga_service.search_stream(my_query) method using the client.get_service("GoogleAdsService"). However i'm getting the error: " Version v10 is deprecated. Requests to this version will be blocked."

I run the print(google.ads.googleads.VERSION) code and I get the response that the installed version is v16.0.0 however I passed the version to GoogleAdsClient like this: GoogleAdsClient.load_from_storage("my_file.yaml", version=" v16")

In response I got the following error: Specified Google Ads API version "v16" does not exist. Valid API versions are: "v10", "v9"

I made the same call to the method GoogleAdsClient.load_from_storage("my_file.yaml", version=" v10") and GoogleAdsClient.load_from_storage("my_file.yaml", version=" v9")

I made the same call to the method GoogleAdsClient.load_from_storage("my_file.yaml", version=" v10") and got response: Version v10 is deprecated. Requests to this version will be blocked."

When I run GoogleAdsClient.load_from_storage("my_file.yaml", version=" v9") I get the response: google.api_core.exceptions.MethodNotImplemented: 501 GRPC target method can't be resolved

Can you help me? This issue may be associated with settings on the GoogleAds platform?

I'm facing an error when creating a media template with sample image file. I'm following the developer facebook documentation: "https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates/#message--media----interactive-templates" and the section is "Example Media Template Request".

I'm trying the following code.

My component code is :

[{"type":"header","format":"IMAGE","example":{"header_handle":["https://edailyshopping.com/images/download.jpg"]}},{"type":"body","text":"Wishing you all Ramadan Mubarak."}] 

API URL: https://graph.facebook.com/v16.0/{whatsapp-business-account-ID}/message_template

response is getting success.

**The problem is template is created but the sample media file is not uploaded. **

Can anyone any idea about it why the sample image is not uploaded?

I am using Whatsapp cloud API. I have configured the webhook with a valid URL. It is working properly. But the issue is that once I receive a message from the business and if I send back a message immediately, the callback URL not getting invoked instantly. It waits for three minutes to invoke the endpoint. And if I wait for 3 minutes after a response and then send a message then it invokes instantly. Not able to find the reason. Nothing in the documentation also. I want to make it faster. For all the messages, the webhook should be triggered instantly.

https://developers.facebook.com/docs/whatsapp/cloud-api/get-started This is the documentation I followed.

Any help would be highly appreciable. Thanks in advance.

I tried sending back 200 OK for all the requests as per the documentation

My server code looks like this:

const fs = require('fs'); const token = process.env.ACCESS_TOKEN; // Imports dependencies and set up http server const request = require("request"),   express = require("express"),   body_parser = require("body-parser"),   axios = require("axios").default,   app = express().use(body_parser.json()); // creates express http server // Sets server port and logs message on success var https = require('https'); var credentials = {     key: fs.readFileSync(process.env.key),     cert: fs.readFileSync(process.env.cert),     ca: fs.readFileSync(process.env.ca, 'utf-8') } var httpsServer = https.createServer(credentials, app); httpsServer.listen(process.env.PORT, async () => {   console.log("Whatsapp server listening to port: "+process.env.PORT);   // await mysqlConnector.initializeMySql(app);   // await redis.initializeRedis(); }); 

And my webhook post method looks like this:

app.post("/inbound", async (req, res) => {   // Parse the request body from the POST   let body = req.body;   // Check the Incoming webhook message   // console.log(JSON.stringify(req.body, null, 2));   // info on WhatsApp text message payload: https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/payload-examples#text-messages   if (req.body.object) {     if (       body.entry &&       body.entry[0].changes &&       body.entry[0].changes[0] &&       body.entry[0].changes[0].value.messages &&       body.entry[0].changes[0].value. Messages[0]     ) {       res.sendStatus(200);        //if the business needs to send a text message       //async function call to send a text message (It is a promise function that makes API call to the /message endpoint of WhatsApp business API)        // if the business needs to send an interactive message       //async function call to send interactive message(promise function)     //if the business needs to send a template     //async function call to send message template(Promise function) } } } 

And the function that send the text message:

 sendMessage: async function (message, incomingMessageFrom, outgoingMessageFrom, accessToken) {     return new Promise(async function (resolve, reject) {       try {         axios({           method: "POST",           url: "https://graph.facebook.com/v16.0/" +             outgoingMessageFrom +             "/messages?access_token=" +             accessToken,           data: {             messaging_product: "whatsapp",             "to": incomingMessageFrom,             "type": "text",             "text": {               "body": String(message)             }           },           headers: { "Content-Type": "application/json" }         }).then(response => {           resolve(response.data)         });       } catch (error) {         //log Error         resolve("error: " + JSON.stringify(error.message));       }     })   } 

And the function that sends the template:

 sendMessageTemplate: async function (templateName, params, incomingMessageFrom, outgoingMessageFrom, accessToken) {     await this.bindParams(params, templateName);     return new Promise(async function (resolve, reject) {       try {         //call bind params         let data = {           "messaging_product": "whatsapp",           "to": incomingMessageFrom,           "type": "template",           "template": templates[templateName]         }         let url = "https://graph.facebook.com/v12.0/" +         outgoingMessageFrom +         "/messages?access_token=" +         accessToken;         axios({           method: "POST", // Required, HTTP method, a string, e.g. POST, GET           url:url,           data: data,           headers: { "Content-Type": "application/json" },         }).then(response => {           resolve(response.data)         }).catch(err =>{           appLogger.logMessage("error","Failed to call template api due to: "+JSON.stringify(err.message),className,"sendMessageTemplate","ADMIN","Server",moduleName);         });         appLogger.logMessage("debug","The request data send is: "+JSON.stringify(data),className,"sendMessageTemplate","ADMIN","SERVER",moduleName);         appLogger.logMessage("debug","The request url send is: "+url,className,"sendMessageTemplate","ADMIN","SERVER",moduleName);       } catch (error) {         appLogger.logMessage("error","error occured while sending message template: "+JSON.stringify(error.message),"sendMessageTemplate","ADMIN","SERVER",moduleName);         //logError         resolve("error: " + JSON.stringify(error.message));       }     })   } 

I have created a media template in what's app business API. But I cannot send the template message where the media file is attached in the header.

My media template object.

{     "name": "business_five",     "components": [         {             "type": "HEADER",             "format": "IMAGE",             "example": {                 "header_handle": [                     "https://scontent.whatsapp.net/v/t61.29466-34/323170987_1239753446972881_6537482729362490175_n.jpg?ccb=1-7&_nc_sid=57045b&_nc_ohc=24dzgQb3Xc8AX9Nllk_&_nc_ht=scontent.whatsapp.net&edm=AH51TzQEAAAA&oh=01_AdRx0hLfUqy4nKvgGz1cf23Em9ElezWo1o4UPrfwPGeVgg&oe=64336E79"                 ]             }         },         {             "type": "BODY",             "text": "Dear All,\nWishing you ramadan mubarak."         }     ],     "language": "en_US",     "status": "APPROVED",     "category": "MARKETING",     "id": "1235769690704590" } 

When I'm sending this template message to others using the API https://graph.facebook.com/{{version}}/{{phone_number_id}}/messages
it's showing the error :

(#132012) Parameter format does not match format in the created template

Can anyone help me with how can I send a media template message? My post field was

$message = [     "messaging_product" => "whatsapp",     "to" => "8801704158504",     "type" => "template",     "template" => [         "name" => $template->name,         "language" => [             "code" => $template->language         ],         "components" => [             [                 "type" => "header",                 "parameters" => [                     'type' => 'image',                     'image' => [                         'link' => 'https://imgur.com/a/wu3BP6R'                     ]                 ]             ]         ]     ] ]; 

Good days, I am trying to install the library with the "pecl install grpc" command and it is returning the following error: "Fatal error: Array and string offset access syntax with curly braces is no longer supported in C:\xampp\php\pear\PEAR\Config.php on line 2095".

I don't know why but it gives a PHP related syntax error.

The PHP version I'm using is:

"PHP 8.2.0 (cli) (built: Dec 6 2022 15:31:23) (ZTS Visual C++ 2019 x64) Copyright (c) The PHP Group Zend Engine v4.2.0, Copyright (c) Zend Technologies"

And it is not only that file but many more with which it gives a syntax error.

Tried reinstalling PHP and Xampp

Any solution or idea on how to fix it or install it properly?

Thank you.