WhatsApp Cloud API · error code

WhatsApp error 131021: Recipient cannot be sender

Permanent - do not retryHTTP 400Recipient & delivery

Last verified against Meta for Developers - Cloud API error codes

What WhatsApp returns
Sender and recipient phone number is the same.

What error 131021 means

Code 131021 means the number in the to field is the same as the business phone number you are sending from. WhatsApp does not allow a business number to message itself, so the platform rejects the request before attempting delivery. It is one of the few WhatsApp errors with exactly one cause, and it is almost always a bug in how the recipient was chosen rather than a deliberate action.

It tends to appear in three places: test harnesses that default the recipient to the business number, contact imports where the business's own number was saved as a customer, and echo or auto-reply flows that accidentally read the sender field from an outbound status webhook instead of the inbound message.

The number itself is not invalid and your account is fine. You simply pointed the message at the wrong party.

Why it happens

  • A default or placeholder recipient in configuration that equals the business number.
  • Auto-reply logic that takes the from value from a status webhook (which is your own number) rather than from an inbound message.
  • The business phone number present in the contact list as a customer record.
  • A broadcast that includes the sending number for monitoring purposes.

How to fix WhatsApp error 131021

  1. 1Log the to value and the sender's display_phone_number for the failing request and confirm they match.
  2. 2In inbound handlers, read the customer number from messages[].from in the webhook, never from statuses[].recipient_id of your own sends.
  3. 3Remove the business number from contact lists and campaign audiences.
  4. 4If you need a monitoring recipient, use a separate verified test number instead.

How to stop it recurring

Add a guard in your send function that rejects any recipient equal to the configured business number before the request leaves your service, and unit-test it. Filter the business number out of imports. This error costs nothing in rate limit but it is a sign that recipient selection logic has a hole worth closing. It is a cousin of 131026 only in appearance: 131026 is about the recipient's reachability, while 131021 is your own number reflected back at you. The webhook-field mix-ups that cause it are covered in the error-code guide.

Official reference: Meta for Developers - Cloud API error codes. See all WhatsApp error codes or the WhatsApp limits and quotas.

Related codes

Error 131021 - quick answers

What does WhatsApp error 131021 mean?

Code 131021 means the number in the to field is the same as the business phone number you are sending from. WhatsApp does not allow a business number to message itself, so the platform rejects the request before attempting delivery. It is one of the few WhatsApp errors with exactly one cause, and it is almost always a bug in how the recipient was chosen rather than a deliberate action.

How do I fix WhatsApp error 131021?

1. Log the to value and the sender's display_phone_number for the failing request and confirm they match. 2. In inbound handlers, read the customer number from messages[].from in the webhook, never from statuses[].recipient_id of your own sends. 3. Remove the business number from contact lists and campaign audiences. 4. If you need a monitoring recipient, use a separate verified test number instead.

Should I retry after error 131021?

No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.

Stop debugging WhatsApp by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.