Posts tagged with laravel

Hey There Developers I am Trying to Integrate What's App Cloud Api from Meta for Developers Console and I am trying to Retrieve The Messages Templates using the api's .Reading it from there documentation i had created the api to retrive the templates but it shows me this error

"error": {         "message": "(#100) Tried accessing nonexisting field (message_templates) on node type (WhatsAppBusinessPhoneNumber)",         "type": "OAuthException",         "code": 100,         "fbtrace_id": "AHUox6aJYuhq3S7NnNDSE03"     } 

It would be a great help if you can help me solve this problem I have been Researching on the same for over a week now .....Thank You in advance

I am looking this api to retrieve all my available templates on the developers console
Meta For Developers

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 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'                     ]                 ]             ]         ]     ] ]; 

I'm getting this error when running this code:

$googleAdsClient->getGoogleAdsServiceClient()->search($customerId, $query, $page_size); 

ERROR message: proto descriptor was previously loaded (included in multiple metadata bundles?): google/ads/googleads/v5/enums/policy_topic_evidence_destination_not_working_dns_error_type.proto

$googleAdsClient is an instance of \Google\Ads\GoogleAds\Lib\V5\GoogleAdsClient.

The getGoogleAdsServiceClient method comes from the ServiceClientFactoryTrait trait /Google/Ads/GoogleAds/Lib/V5/ServiceClientFactoryTrait.php

I'm running:

php 7.4.1 grpc module version => 1.34.0 protobuf version => 3.14.0 

Additional libs installed via composer:

google/grpc-gcp                       0.1.5      gRPC GCP library for channel management google/protobuf                       v3.13.0.1  proto library for PHP googleads/google-ads-php              v5.0.0     Google Ads API client for PHP grpc/grpc                             1.30.0     gRPC library for PHP 

I don't know enough about descriptors or the protobuf library to understand this error. It just started happening a couple days ago and I don't think we made any changes that would effect this. Any help/guidance would be much appreciated.

EDIT: forgot to link to SDK https://github.com/googleads/google-ads-php

EDIT: updated the following libs:

google/apiclient                     v2.9.1     Client library for Google APIs google/apiclient-services            v0.161.0   Client library for Google APIs google/auth                          v1.15.0    Google Auth Library for PHP google/common-protos                 1.3        Google API Common Protos for PHP google/gax                           1.7.0      Google API Core for PHP google/grpc-gcp                      0.1.5      gRPC GCP library for channel management google/protobuf                      v3.15.3    proto library for PHP googleads/google-ads-php             v7.0.0     Google Ads API client for PHP grpc/grpc                            1.35.0     gRPC library for PHP google/protobuf                      v3.15.3    proto library for PHP