Posts tagged with whatsapp-cloud-api

I've gone through the whole flow of whatsapp business api with embedded signup. I'm facing two issues.

  1. I've gone through the embed signup step and getting the right responses, access tokens, etc. The issue I am having is that after subscribing to a webhook, any messages sent to the registered phone number is not triggering the whatsapp webhook I've built on my server. I do see the log for the verification being checked to make sure it is available but not getting any message events.

  2. Randomly after experiencing the above issue, the registered phone number stopped working and now when trying with new numbers, it the whatsapp business app keeps saying try again in one hour. how do i fix this?

Thanks for any help in advance!

If I have wamid, is there a way to retrieve all message information, including whether it was sent, delivered, or read via the API?

I am receiving via webhook status sent, delivered and read, however, the wamid sent in the webhook is different from the message with text content

I need to update the status (sent, delivered and read) of the message with text content.

The first message with text content has a different wamid than the warning via webhook with the information sent, deliveres and read

I am using whatsapp business platform. I created a catalog using commerce manager and have connected it to my Whatsapp Business Account. Now, I want to create sets/collection in my catalog. When I try to create it using this documentation The set was created but I cannot see any 'publish' option to make the changes appear on the Whatsapp as well. When I followed this documentation I get an error saying

{ "error": {     "message": "Unsupported post request. Object with ID '<Product_Catalog_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": "" } 

}

I have been sending msgs using this same catalog id. Then what could be the problem here? How can we make and publish sets for Whatsapp? Also, for publish_to_shops, shop ids are needed. Where can I find one for my whatsapp? As the WABA id is not considered a shop id.

UPDATE: Solved the issue of 'Unsupported post request. Object with ID '<Product_Catalog_id>' does not exist'. It was missing a permission called catalog_management.

But still cannot find anything to publish the sets on whatsapp catalog.

How can we make categories on whatsapp catalog using whatsapp API?

I'm developing a Flask app to store data from my clients (Datakinder parents). I am receiving the request and decrypting the message successfully. But I always receive incorrect data On on-click-action' I expect to receive user typed data but I always receive ${form.parentname} , not the user data

Footer code is:

                        "type": "Footer",                         "label": "Siguiente",                         "on-click-action": {                             "name": "data_exchange",                             "payload" : {                                 "parentname":"${form.parentname}"                             }                         },                         "enabled":true                      } 

At clicked "Siguiente" (next), endpoint receive data={'parentname': '${form.parentname}'} it must be : data={'parentname': 'Alejandro'}

Any Idea?

I sent fixed data in payload and it was received properly, but form data is not

im failing to decrypt the response from the whatsapp flow, and im using php, codeigniter 4 with the phpseclib3 library, and below is my sample code:

private function decryptRequest($body, $privatePem) {     $encryptedAesKey   = base64_decode($body['encrypted_aes_key']);     $encryptedFlowData = base64_decode($body['encrypted_flow_data']);     $initialVector     = base64_decode($body['initial_vector']);     $rsa = RSA::load($privatePem)         ->withPadding(RSA::ENCRYPTION_OAEP)         ->withHash('sha256')         ->withMGFHash('sha256');                          $decryptedAesKey = $rsa->decrypt($encryptedAesKey);              if (!$decryptedAesKey) {         throw new Exception('Decryption of AES key failed.');     }          $aes = new AES('gcm');     $aes->setKey($decryptedAesKey);     $aes->setNonce($initialVector);          $decrypted = $aes->decrypt($encryptedFlowData);     if (!$decrypted) {         throw new Exception('Decryption of flow data failed.');     }          return [         'decryptedBody' => json_decode($decrypted, true),         'aesKeyBuffer' => $decryptedAesKey,         'initialVectorBuffer' => $initialVector,     ]; } 

and im getting the Ciphertext representative too long error on this line: $decryptedAesKey = $rsa->decrypt($encryptedAesKey);

I have tried to refer to the docementation here https://developers.facebook.com/docs/whatsapp/cloud-api/reference/whatsapp-business-encryption