Posts under category Facebook WhatsApp Business API

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

I am trying to use Meta Cloud API to send an image as whatsapp message, but I don't want to upload it anywhere, can't i just send the binary buffer?

something like this:

const formData = new FormData(); formData.append('messaging_product', 'whatsapp'); formData.append('recipient_type', 'individual'); formData.append('to', content.to); formData.append('type', 'image'); formData.append(     'file',     content.image_buffer,     {         filename: 'image.png',         contentType: 'image/png',     } ); 

I was using a service (Business Solution Provider) that allowed me to send the image directly as binary buffer. Now i will use Meta Cloud API, but didn't find anything like this in the docs

Hi can anyone relate to this? my WABA Account just get banned over and over again because they said it breach the terms of acceptable used. I try with different facebook account,different number with various country code,i try with so many BSP, i even use VPN but when I made WABA its always disable because They say I breach the terms of acceptable use. Has anyone ever get this type of banned to? And How to resolve it because I need to made many WABA Account for my client.

I just migrated a number from
previous (was on dialog 360): waba id: 233934109801832 & phone id: 207432572461460
new (my own app, which is an approved tech provider): waba id: 271460509379017 & phone id: 274762832380571
app's name is Spur (app id: 931280875302744), embedded signup flow went well, previous waba 2 factor was turned off, but when i hit register on the new waba phone id i get:
{
"error": {
"message": "(#100) Invalid parameter",
"type": "OAuthException",
"code": 100,
"error_data": {
"messaging_product": "whatsapp",
"details": "Provided Phone Number ID 274762832380571 does not match stored Phone Number ID 207432572461460 for 41435082047. Try deleting the previous registration first."
},
"fbtrace_id": "AMZjVZ7PIWx-7Lws_iEIm2t"
}
}
request is
curl --location 'https://graph.facebook.com/v19.0/274762832380571/register' --header 'Authorization: Bearer ' --header 'Content-Type: application/json' --data '{
"messaging_product": "whatsapp",
"pin": "123456"
}'
Anyone came across this issue?

I have done these things: - Verified my business - Added payment information - Submitted Business License - Added a valid phone number
Then when I click 'Request for Review' under the Business Support Home page, then after just a few minutes I was rejected with this message
'Business remains disabled The review you requested confirmed that {Company Name} was violating WhatsApp’s Business Terms of Service.'
What exactly am I still missing here? Please let me know which terms I'm violating.. I tried to email their support but they never replied to me. I've been stuck for 1 month just trying to get my Whatsapp phone number verified, any help would be greatly appreciated thanks.