When using the WhatsApp Business API, error code 131021 with the message "Recipient cannot be sender" occurs when the sender and recipient phone numbers are the same. This is a 400 Bad Request error, and it happens because the API does not allow sending messages to the sender’s own phone number.
What Causes Error 131021?
This error occurs if:
The recipient phone number matches the sender's number.
An invalid recipient number is accidentally set to the sender’s number.
The WhatsApp API does not permit sending messages to the same number registered as the sender.
Things to Keep in Mind
If testing, use a separate phone number or a dedicated testing number instead of your sender number.
Validate phone numbers in your application to prevent accidental use of the sender’s number as the recipient.
For more troubleshooting tips related to WhatsApp Business API check out heltar.com/blogs.