iachat/app/services/whatsapp
Eduardo Policarpo 46b75e1b03
feat(whatsapp): add optional phone_number_id parameter to media retrieval API (#11823)
## Description

This pull request introduces an optional parameter, `phone_number_id`,
to the WhatsApp API call responsible for retrieving media. The addition
of this parameter allows for greater flexibility when interacting with
the WhatsApp API, as it can now accommodate scenarios where specifying a
particular phone number ID is necessary. This change is backward
compatible and does not affect existing functionality if the parameter
is not provided.

Fixes # (issue)

## Type of change

- [x] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?

The changes were tested locally by invoking the WhatsApp media retrieval
API with and without the `phone_number_id` parameter. Both scenarios
were verified to ensure that:

- When `phone_number_id` is provided, the API call includes the
parameter and functions as expected.
- When `phone_number_id` is omitted, the API call continues to work as
before, maintaining backward compatibility.

No errors or warnings were observed during testing, and all relevant
unit tests passed successfully.

## Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-09-23 09:16:59 +05:30
..
providers feat(whatsapp): add optional phone_number_id parameter to media retrieval API (#11823) 2025-09-23 09:16:59 +05:30
channel_creation_service.rb fix: setup webhook for create and update should be done after db commit (#12176) 2025-08-13 20:53:31 +05:30
embedded_signup_service.rb fix: setup webhook for create and update should be done after db commit (#12176) 2025-08-13 20:53:31 +05:30
facebook_api_client.rb feat: add support to embedded whatsapp coexistence method (#12108) 2025-08-08 18:28:50 +05:30
incoming_message_base_service.rb feat: Add WhatsApp profile for contact name resolution (#12123) 2025-08-12 14:20:52 +05:30
incoming_message_service_helpers.rb fix: Avoid processing reactions, ephemeral, request_welcome or unsupported messages (#8780) 2024-01-25 11:40:18 +04:00
incoming_message_service.rb feat: Support for Whatsapp Cloud API (#4938) 2022-07-06 21:45:03 +02:00
incoming_message_whatsapp_cloud_service.rb feat(whatsapp): add optional phone_number_id parameter to media retrieval API (#11823) 2025-09-23 09:16:59 +05:30
oneoff_campaign_service.rb fix: Improve WhatsApp template message error handling (#12168) 2025-08-12 16:31:56 +05:30
phone_info_service.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
populate_template_parameters_service.rb feat: Add media_name support for WhatsApp templates document files (#12462) 2025-09-18 15:25:31 +05:30
reauthorization_service.rb feat: add reauth flow for wa embedded signup (#11940) 2025-08-08 01:48:45 +05:30
send_on_whatsapp_service.rb fix: Improve WhatsApp template message error handling (#12168) 2025-08-12 16:31:56 +05:30
template_parameter_converter_service.rb fix: Handle nil processed_params for WhatsApp templates without params (#12177) 2025-08-12 22:56:53 +05:30
template_processor_service.rb feat: Add media_name support for WhatsApp templates document files (#12462) 2025-09-18 15:25:31 +05:30
token_exchange_service.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
token_validation_service.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
webhook_setup_service.rb feat: add support to embedded whatsapp coexistence method (#12108) 2025-08-08 18:28:50 +05:30
webhook_teardown_service.rb feat: Remove subscription on WhatsApp inbox delete (#11977) 2025-07-24 14:04:19 +04:00