Posts under category Facebook WhatsApp Business API

I am Using Whatsapp Media API to get Image send from user to business number using webhooks and I also get the Image ID and URL and Image as well in Postman but when I use that curl request made from Postman it always shows Facebook error:

Sorry, something went wrong. We're working on it and we'll get it fixed as soon as we can.

But its working fine in Postman what am I doing wrong?

<?php $ua = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.16 (KHTML, like Gecko) \  Chrome/24.0.1304.0 Safari/537.16'; $curl = curl_init(); curl_setopt_array($curl, array(   CURLOPT_URL => 'Image_URL_from_Api',   CURLOPT_USERAGENT => $ua,   CURLOPT_RETURNTRANSFER => true,   CURLOPT_ENCODING => '',   CURLOPT_MAXREDIRS => 10,   CURLOPT_TIMEOUT => 0,   CURLOPT_FOLLOWLOCATION => true,   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,   CURLOPT_CUSTOMREQUEST => 'GET',   CURLOPT_SSL_VERIFYPEER => false,   CURLOPT_HTTPHEADER => array(     'Authorization: Bearer My_Token'   ), )); $response = curl_exec($curl); curl_close($curl); echo $response; 

I am trying to create a connection between our WhatsApp Business account and our website where we gather all messages sent to our business on different channels (through our own app, text, WhatsApp, ...).

I've followed this tutorial (https://developers.facebook.com/docs/whatsapp/cloud-api/get-started) and have everything set up: our WhatsApp Business is working correctly, I've added a Meta App and I've set up the webhooks with a connection to my node.js backend. When I click Test next to the "Messaging" webhook, I receive the message on my node.js backend and website. So I know this side is working as it should.

I've then used the Graph API to subscribe my Meta app to the messages with the business id of the WhatsApp with the correct permissions. When checking the subscribed apps with the {business_id}/subscribed_apps endpoint, I can see my Meta app. So I believe everything is set up correctly. My Meta app is also set to "production".

However, when I try to send a message with my personal WhatsApp to my business WhatsApp, I receive nothing on the webhook. I checked the logs on my server and nothing is being received, so I know it's not an issue in my node.js backend.

Is there something else I need to do to make this work? Does the Meta app need to be verified to use the webhook in production? If so, how can I do this? The guide for verification says I need a platform and login insctructions, but the Meta app is really only a webhook without an interface.

Thanks in advance.

Currently, I am using WhatsApp Business api cloud on one of my web project, I would like to register a customer's phone number but via api instead through meta, developer platform like following:

"Here is the image to register customer's number in the meta developer platform"

I want do this: (managing the phone numbers)

but via api, and later of that send the verification code via api as well. If someone can help me , telling me if that is possible and sharing documentation or the endpoint I would appreciate it very much, I've been looking at the documentation and postman's examples for 2 days without any success.

I'm sorry I didn't share the pictures directly, it is my first question on Stackoverflow

Thanks in advance, Greetings!

I am trying to setup a webhook in AWS Lambda (using API Gateway) for Meta's WhatsApp Business API. They have the following guidelines:

Whenever your endpoint receives a verification request, it must:

Verify that the hub.verify_token value matches the string you set in the Verify Token field when you configure Webhooks in your App Dashboard (you haven't set up this token string yet). Respond with the hub.challenge value."

I have setup all the query strings it needs in the API gateway. Here is what my lambda handler looks like:

def lambda_handler(event, context):     response = {         "status": 400,         "body" : "failed"     }          print(str(event))          print("Received context" + str(context))          if(len(event) != 0 and (event['hub.verify_token'] == "some value")):         response['status'] = 200         response['body'] = event['hub.challenge']         return event['hub.challenge']               #print(response)         #returnResponse = re.findall('[0-9]+', event['hub.challenge'])         #return returnResponse[0]              else:         return(response) 

the event looks like:

{     "hub.mode" : "some value",     "hub.verify_token": "some value",     "hub.challenge": "1158201444" } 

The response in AWS console looks like "1158201444" but on meta's end, the response looks like "\"1158201444\"" and the webhook confirmation fails in Meta's dashboard.

How can remove the extra characters and decode the string? I have already tried regex and still getting the extra characters (\"\").