Partial Outageshare-external
I implemented the WhatsApp Cloud API to send images. Response is 200 but not sent image
0

I implemented the WhatsApp Cloud API to send images. As per the documentation, we need to:

Send the first API request to get the media ID. Use the media ID from the first API response in the second API request to send the image. Both requests return a success status code (200 OK), but the image is not sent to the receiver's mobile number.

Please see the request and response details below:

Upload Image API Request:

URL: https://graph.facebook.com/v19.0/373997812459083/media

Headers: Authorization: Bearer {access_token} Content-Type: application/json

Request Body: { "file": "@/local/path/file.jpg;type=image/jpeg", "messaging_product": "whatsapp" }

Response: { "id": "4490709327384033" }

Send Image Message API Request:

URL: https://graph.facebook.com/{{Version}}/{{Phone-Number-ID}}/messages

Headers: Authorization: Bearer {access_token} Content-Type: application/json

Request Body: { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "919974053518", "type": "image", "image": { "id": "4490709327384033" } }

response: OK Please provide a solution on how to use the image sending service correctly.

Additionally, I could not find any details in the WhatsApp Cloud API log files.

Dhairy
Asked about 5 months ago