Posts under category Facebook WhatsApp Business API

I was doing coding in node js but in that it there is requirement of setup like that

APP_ID=<<YOUR-WHATSAPP-BUSINESS-APP_ID>> APP_SECRET=<<YOUR-WHATSAPP-BUSINESS-APP_SECRET>> RECIPIENT_WAID=<<YOUR-RECIPIENT-TEST-PHONE-NUMBER>> VERSION=v13.0 PHONE_NUMBER_ID=<<YOUR-WHATSAPP-BUSINESS-PHONE-NUMBER-ID>> ACCESS_TOKEN=<<YOUR-SYSTEM-USER-ACCESS-TOKEN>>   

I got all credential accept app_secret. I am unable to find that if anyone know how can I get app_secret please let me know.

Thanks in advance.

I searched on dashboard but couldn't find that.

Facebook has the following API -

https://graph.facebook.com/API_VERSION/me?fields=FIELDS&access_token=ACCESS_TOKEN 

Does WhatsApp have a similar API where I can get all account information, such as phone number ID and business account ID, by using only the access token and nothing else? I have searched the official documentation and all the APIs I have come across either use the business account ID or the phone number ID to retrieve account information.

I would really appreciate any suggestions provided. Thank you.

I am trying to send WhatsApp message, using WhatsApp Business API and GraphQL.

But I am getting this error:

Failed to send message to :  {     "error":{         "message":"(#132012) Parameter format does not match format in the created template",         "type":"OAuthException",         "code":132012,         "error_data": {             "messaging_product":"whatsapp",             "details":"header: Format mismatch, expected IMAGE, received UNKNOWN"         },         "fbtrace_id":"AyPLLsvyikPmg66DWF_ZfYU"     } } 

This is the code I have written. And also I am sharing the message structure.

import requests import openpyxl access_token = "" template_name = "healthy_sports_b2s_2"  # Replace with your template name language_code = "en" wb = openpyxl.load_workbook("numbers.xlsx") sheet = wb.active for row in sheet.iter_rows(min_row=2, values_only=True):     customer_number = row[0]     url = f"https://graph.facebook.com/v17.0/XXXXXXXXXXXXXXX/messages"     headers = {         "Authorization": f"Bearer {access_token}",         "Content-Type": "application/json",     }     message_payload = {         "messaging_product": "whatsapp",         "to": customer_number,         "type": "template",         "template": {"name": template_name, "language": {"code": language_code}},         "components": [             {                 "parameters": [                     {                         "type": "template",                         "image": {                             "link": "https://res.cloudinary.com/dapnrioqr/image/upload/v1691648851/02_wgucrp.jpg"                         },                     }                 ]             }         ],     }     response = requests.post(url, json=message_payload, headers=headers)     if response.status_code == 200:         print(f"Message sent to {customer_number}")     else:         print(f"Failed to send message to {customer_number}: {response.text}") 

What can I do to solve this

This is the actual message

I have been using a Twilio phone number connected to a WhatsApp Business Account.

As far as I understand, for each conversation started, WhatsApp gives me a 24-hour window where I can send and receive any number of messages without additional charges (WhatsApp Conversation - Free Tier). However, it seems that I am somehow incurring in additional charges for each message sent and received (Messaging Channels Inbound Message and Messaging Channels Outbound Message where each costs $0.005).

I configured the WhatsApp sender to work with a webhook redirecting to an Azure Function App running Python Flask. Despite I can answer an incoming message via a Python Flask, I chose answering via the Twilio REST API (from twilio.rest import Client), since the webhook method gives me only 15 seconds to send an answer or it cuts the connection throwing error 11200, and some of my processes take longer than that.

Are this extra costs because I am using the Twilio REST API or is this a normal behavior of Twilio WhatsApp?

I am working on implementing a custom WhatsApp API integration to send verification codes to users on WhatsApp. I have already been approved for access to the WhatsApp Business API and obtained the necessary credentials.

Now, I want to send verification codes to users through WhatsApp using my custom integration. But I don't have any idea that how to do that?

I just wanna know How do I generate a random verification code in my application without getting any bugs?

And also I wanna know Which WhatsApp API endpoints should I use to send the verification code as a text message?

I was expecting a the most suitable way to do these things without getting any bugs