Posts tagged with api

I have created a WhatsApp business App on https://developers.facebook.com/apps/

I am able to send messages using the API & Access Token

curl -X POST \   'https://graph.facebook.com/v15.0/FROM_PHONE_NUMBER_ID/messages' \   -H "Authorization: ACCESS_TOKEN" \   -d '{     "messaging_product": "whatsapp",     "to": "1650XXXXXXX",     "text": {"body" : "hi"}    }' 

I want to send the message in a WhatsApp group, any ways to achieve this?

So in short, my task is to extract data from Google, and I'm curious if it's possible to fetch data using Google Ads API for different customers without all the required keys (developer token, refresh token, client_id and client secret). Is this possible or not? If yes, what privileges do I need, and what are the steps? If you know where I can find some clear documentation about this, it will be a lifesaver.

Thanks!

Here's what I've done. I'm using Python programming language.

res = requests.put(     url='https://graph.facebook.com/v13.0/messages/wamid.HBgMOTE4NzgwNDk1ODA0FQIAEhggQkU2OURGQUYyMzdCNDlBRkQ1QUI4RERBNDdENDBBOEIA',      header = {         "Authorization": "Bearer my-auth-token",         "Content-Type": "application/json"     },      data=json.dumps({"status": "read"}) ) print(res.json()) 

Output:

{'error': {'message': 'Unknown path components: /wamid.HBgMOTE4NzgwNDk1ODA0FQIAEhggQkU2OURGQUYyMzdCNDlBRkQ1QUI4RERBNDdENDBBOEIA', 'type': 'OAuthException', 'code': 2500, 'fbtrace_id': 'A6f8nCvHOSXSZcAGmevCGeJ'}} 

Can someone please clarify which is the correct WhatsApp Business Account ID to use to access the WhatsApp cloud API?

I have properly set up my webhook and can receive messages. However when I try to send a message using the WhatsApp Business Account ID (marked as number 1 in the attached image) provided here, I get the following error:

error: {     message:       "Unsupported post request. Object with ID '< my app id>' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",     type: "GraphMethodException",     code: 100,     error_subcode: 33,     fbtrace_id: "AQXqjuSJKTWBnyJdUK_W-jj", },  

However when I switch to the second WhatsApp Business Account ID in the curl command (marked as number 2 in the attached image), it works.

What confuses me is that the incoming message has the first WhatsApp Business Account ID (marked number 1 in the attached image) like so:

message: {   object: "whatsapp_business_account",   entry: [     {       id: "xxxxxxxxxxxxxxx",  // This matches the first       changes: [           ...       ],     },   ], }; 

I am using the current api v14.0. Is there some setting I need to change?