Posts under category Meta & Facebook

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.