iachat/spec/services/whatsapp
Muhsin Keloth 457430e8d9
fix: Remove phone_number_id param from WhatsApp media retrieval for incoming messages (#13319)
Fixes https://github.com/chatwoot/chatwoot/issues/13317
Fixes an issue where WhatsApp attachment messages (images, audio, video,
documents) were failing to download. Messages were being created but
without attachments.

The `phone_number_id` parameter was being passed to the `GET
/<MEDIA_ID>` endpoint when downloading incoming media. According to
Meta's documentation:

> "Note that `phone_number_id` is optional. If included, the request
will only be processed if the business phone number ID included in the
query matches the ID of the business
  phone number **that the media was uploaded on**."

For incoming messages, media is uploaded by the customer, not by the
business phone number. Passing the business's `phone_number_id` causes
validation to fail with error: `Param phone_number_id is not a valid
whatsapp business phone number id ID`

This PR removes the `phone_number_id` parameter from the media URL
request for incoming messages.
2026-01-20 20:32:23 +04:00
..
providers feat: Add backend changes for whatsapp csat template (#12984) 2025-12-11 16:36:37 +05:30
channel_creation_service_spec.rb fix: Remove the same account validation for whatsapp channels (#12811) 2025-11-06 21:18:52 +05:30
csat_template_service_spec.rb feat: Add backend changes for whatsapp csat template (#12984) 2025-12-11 16:36:37 +05:30
embedded_signup_service_spec.rb feat: Add WhatsApp health monitoring and self-service registration completion (#12556) 2025-10-02 11:25:48 +05:30
facebook_api_client_spec.rb feat: Remove subscription on WhatsApp inbox delete (#11977) 2025-07-24 14:04:19 +04:00
incoming_message_service_spec.rb fix: Duplicate contacts creating for Argentina numbers (#11173) 2025-10-13 11:07:07 +05:30
incoming_message_whatsapp_cloud_service_spec.rb fix: Remove phone_number_id param from WhatsApp media retrieval for incoming messages (#13319) 2026-01-20 20:32:23 +04:00
oneoff_campaign_service_spec.rb fix: Improve WhatsApp template message error handling (#12168) 2025-08-12 16:31:56 +05:30
phone_info_service_spec.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
populate_template_parameters_service_spec.rb fix: Normalize URLs with spaces in WhatsApp template parameters (#12594) 2025-10-08 15:33:06 +05:30
send_on_whatsapp_service_spec.rb chore: WhatsApp template message error handling for invalid templates (#12157) 2025-08-11 20:08:52 +05:30
template_parameter_converter_service_spec.rb fix: Handle nil processed_params for WhatsApp templates without params (#12177) 2025-08-12 22:56:53 +05:30
token_exchange_service_spec.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
token_validation_service_spec.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
webhook_setup_service_spec.rb fix: Setup webhooks for manual WhatsApp Cloud channel creation (#13278) 2026-01-19 14:12:36 +04:00
webhook_teardown_service_spec.rb feat: add reauth flow for wa embedded signup (#11940) 2025-08-08 01:48:45 +05:30