Posts tagged with facebook-graph-api

I recently started using the new Whatsapp Cloud API. Unfortunately already the sample request in the first steps guide gives an error message. The request to the messages endpoint gives the following response:

{   "error": {     "message": "An unknown error occurred",     "type": "OAuthException",     "code": 1,     "error_subcode": 2593006,     "is_transient": false,     "error_user_title": "Account Not Exist",     "error_user_msg": "Account does not exist in Facebook Hosted API, please use /register API to create an account first.",     "fbtrace_id": "AX1Thf9OPBhmj7NlDV6-5IA "   } } 

I am still using the Test WhatsApp Business Account with a Test Number. When calling the register endpoint I get You can’t complete the setup process because your business doesn’t meet WhatsApp’s policy requirements. If you think this is incorrect, reach out to Meta Business Suite support for help.

Does anyone have an idea, what the problem is?

Thank you in advance,

Sören

I am integrating whatsapp graph api/whatsapp cloud api in my webapplication/crm. where I need to send text message or document to the customers and return response from the customers. which will be actioned from my customized crm. and i also want to access whatsapp business app with the same phone no which i am actually using now. So is it possible to access the same for both situation with a single phone No.

I am sending message from Facebook whatsapp api to my number for testing. Message is sent from php but not recieved on mobile. Did I must register business on facebook?

{"messaging_product":"whatsapp","contacts":[{"input":"923040165804","wa_id":"923040165804"}],"messages":[{"id":"wamid.HBgMOTIzMDQwMTY1ODA0FQIAERgSOEM3RDJDRDMyMkFENkIzMTgyAA=="}]}

this php code that I am using.

        $curl = curl_init();         curl_setopt_array($curl, array(             CURLOPT_URL => 'https://graph.facebook.com/v13.0/********/messages/',             CURLOPT_RETURNTRANSFER => true,             CURLOPT_ENCODING => '',             CURLOPT_MAXREDIRS => 10,             CURLOPT_TIMEOUT => 0,             CURLOPT_FOLLOWLOCATION => true,             CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,             CURLOPT_CUSTOMREQUEST => 'POST',             CURLOPT_POSTFIELDS =>json_encode(array("to"=> $number, "messaging_product" => 'whatsapp', "recipient_type" => 'individual',"type"=>"text", 'text'=> array('body'=>'hello_wo332233rld','preview_url'=>'false'))),             CURLOPT_HTTPHEADER => array(                 'Authorization: Bearer '.$chatApiToken,                 'Content-Type: application/json'             ),         ));         $response = curl_exec($curl);         curl_close($curl);         echo $response; 

I've setup a WhatsApp Business to test their new WhatsApp API for sending messages. I've followed the getting started guide, but I'm running into an issue when trying to send a test message to my phone.

I tested sending messages using the test message call in the business settings as shown in the guide and I've created my own /messages call in Postman using a permanent token. Both calls return a 200 status, but neither of them actually sends a message to my phone.

To double check my setup, I added a colleagues phone to the setup and he receives the messages and can interact with my webhook via WhatsApp just fine.

Some posts on Stackoverflow mention having to send a message to the test number first, but I was unable to get this to work and my colleague didn't have to do this.

Is there some kind of setting or issue that could explain why I'm not receiving the messages? I've even tried re-installing WhatsApp and setting up my phonenumber again, but that didn't change anything either.


Updates:

I tried validating my phonenumber via the /contacts endpoint, but it keeps returning an auth error. Updating my token to include all Whatsapp permissions did not change this, whatsapp_business_api_data isn't an option to include.

{ "error": {     "message": "(#100) The parameter whatsapp_business_api_data is required.",     "type": "OAuthException",     "code": 100,     "fbtrace_id": "" } } 

I noticed that my webhook included a status object in change.value.statuses.[0] this mentioned the following:

{ status: 'failed', errors: [{  code: 131000, title: 'Failure due to an internal error. Please retry.' }]} 

Next I created a new app and added the Whatsapp integration, I added and validated my phonenumber via a text and tried to send a test messsage. This also doesn't start a conversation nor does it give me any feedback. If I try to add my phonenumber again, by adding it as another number, I cant and get the error Reason: VERIFIED

Hi I want to use WhatsApp business API in my web application. I have tested it in postman.

Whenever run sample curl code when available in Facebook business page under WhatsApp tab, It run successfully with temporary access token and message delivered to recipient with Facebook saved template. But when I send only text message to recipient then API response become success with message Id but message not yet deliver to recipient.

My curl code sample given bellow

curl --location --request POST 'https://graph.facebook.com/v13.0/106433498743301/messages' \ --header 'Authorization: Bearer EAAOw8oNtvXkBAKk89CqJtyusjxk7c7qGSNS0quxqeZBRtjE5MYwZCK0USeGGLV4n56qNAuaRoRWZA2oCIS8zcz6U5UZAtQCOb6YQnjuXZBfLnyZAwsOZBpASpnNOvvz29T0Jn0aXgZAdo9VKmBv0CkNYuOeb1I7X0GZCEwLHPZBFpfOCj4K3S9CMPjBfYR5Jog06LC95P7UgCr5Fy2nqbRM5Ys' \ --header 'Content-Type: application/json' \ --data-raw '{ "messaging_product": "whatsapp", "preview_url": false, "recipient_type": "individual", "to": "xxxxxxx150", "type": "text", "text": { "body": "Test message" } }'