Channel
Methods for managing and interacting with communication channels
Overview
The Channel module provides functionality to manage communication channels, check their health status, verify phone numbers, and send messages. This module is essential for ensuring reliable communication with your users.
Available Methods
Health Check
Use the health()
method to verify if the communication channel is operational and functioning correctly.
It’s recommended to perform health checks regularly to ensure your communication channels are working properly.
Phone Number Verification
The checkPhoneNumber()
method allows you to validate if a phone number exists and is properly formatted.
This performs a standard verification of the provided phone number.
This performs a standard verification of the provided phone number.
Parameter | Type | Required | Description |
---|---|---|---|
phoneNumber | string | Yes | The phone number to verify (with country code) |
parallel | boolean | No | Whether to run in parallel mode (default: false) |
Parallel Processing
For more complex operations, you can use parallel processing to check phone numbers while performing other actions simultaneously.
When using parallel mode, make sure to call the send()
method at the end to execute all queued operations.