← Blog

·

WhatsApp API Error 131021: Sender and Recipient Are the Same Number

Updated on November 10, 2026

WhatsApp Business API error 131021 means the sender and the recipient phone numbers are the same: your business tried to send a message to its own business number. Meta won’t deliver a message from a number to itself, and its recommended fix is to send to a number different from the sender. In practice, the error almost always comes from a badly set up test or a swapped field in your code.

This guide covers where the error usually comes from, how to block it before the API call and how to test your integration the right way.

What Meta says about 131021

In the Cloud API error codes table, 131021 sits in the “other errors” group:

FieldMeta’s text
DescriptionSender and recipient phone number is the same.
SolutionSend a message to a phone number different from the sender.

There’s no policy, billing or quality issue behind it. It’s a data error: the to field in the request points to the number registered on Cloud API and tied to the PHONE_NUMBER_ID in the URL.

To see where 131021 fits among the other codes, check our guide to WhatsApp API error codes.

Why sending to your own number fails

Cloud API sends messages from a business number to a WhatsApp user. When the destination is the business number itself, there’s no valid two-party conversation, so the API rejects the request.

This catches people off guard for a simple reason: the WhatsApp app lets you message yourself. The API doesn’t. The number registered on the platform is the sender, and nothing else.

Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →

The most common causes in code

Almost every 131021 comes from one of these.

1. Testing with the business number as the recipient

The developer puts whatever number is at hand in to, and that’s usually the business number they just connected. If you use coexistence and the number is still open in the WhatsApp Business app on your phone, the temptation is even bigger: it feels natural to send a message and watch it land on the phone. But in that case the phone is the sender.

2. Using the wrong webhook field as the recipient

The inbound message webhook carries two different numbers, and they’re easy to mix up:

{
  "metadata": {
    "display_phone_number": "5584999990000",
    "phone_number_id": "123456789012345"
  },
  "contacts": [
    { "profile": { "name": "Customer" }, "wa_id": "5511988887777" }
  ],
  "messages": [
    { "from": "5511988887777", "id": "wamid.XXX", "type": "text", "text": { "body": "Hi" } }
  ]
}
  • metadata.display_phone_number is your business number.
  • messages[].from and contacts[].wa_id are the customer’s number.

If your auto-reply puts display_phone_number in to, every reply fails with 131021. The full shape of each message type is in our webhook payload examples.

3. Contact lists that include the business number

Website forms, imported spreadsheets and CRMs sometimes store the company’s own phone as a contact (for instance, when a team member fills in a test signup). In a campaign, that row becomes a lone 131021 in the middle of successful sends.

4. Staging pointing at the production number

When staging and production share the same contact database but send from different numbers, a contact that works in one environment may be the sender number of the other. Keep separate lists per environment.

How to block the error before the call

The cheapest way to handle 131021 is to never make the call. Store the normalized business number (digits only, with country code) next to the PHONE_NUMBER_ID and compare before sending:

const digitsOnly = (n) => String(n).replace(/\D/g, "");

async function sendText({ phoneNumberId, businessNumber, to, text, token }) {
  if (digitsOnly(to) === digitsOnly(businessNumber)) {
    // Same number: Meta would return 131021. Don't send.
    return { ok: false, reason: "recipient_equals_sender" };
  }

  const r = await fetch(`https://graph.facebook.com/v27.0/${phoneNumberId}/messages`, {
    method: "POST",
    headers: {
      Authorization: `Bearer ${token}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      messaging_product: "whatsapp",
      to: digitsOnly(to),
      type: "text",
      text: { body: text },
    }),
  });

  const data = await r.json();
  if (data.error?.code === 131021) {
    return { ok: false, reason: "recipient_equals_sender" };
  }
  return { ok: r.ok, data };
}

Two things to keep in mind:

  • Don’t retry. 131021 isn’t transient. Repeating the same call returns the same error.
  • Watch the status webhook too. Handle the code both in the HTTP response and in any failed status webhook, using the same rule. The error comes in the status’s errors field.

If you need to find out which number is tied to a PHONE_NUMBER_ID, send a GET to the phone number node and read display_phone_number:

curl "https://graph.facebook.com/v27.0/$PHONE_NUMBER_ID?fields=display_phone_number,verified_name" \
  -H "Authorization: Bearer $TOKEN"

Where to find each ID is explained in how to find your WhatsApp Phone Number ID.

How to test the right way

A send test needs two numbers: the business number, which sends, and a personal WhatsApp number, which receives.

With Meta’s Get Started guide

When you follow the Cloud API Get Started guide, you pick a sender business number (the From field) in the app dashboard and add a To number that receives the test message. That recipient is your personal WhatsApp, not the test number.

Once you reply to the message on your phone, the 24-hour customer service window opens, and you can send free-form (non-template) messages to your number. The chat Meta describes as a thread “with yourself” is between the test number and your personal WhatsApp: two different numbers.

With your real business number

  1. Grab a device with a personal WhatsApp account that is not the business number (a teammate’s phone works).
  2. Send an approved template to that number, or have it message you first and reply with free-form text inside the window.
  3. Check the sent, delivered and read statuses in the webhook.
  4. To test the inbound webhook, send a message from the personal number to the business number. To receive the events on your machine, see how to test the WhatsApp webhook locally.

Test checklist

ItemRightWrong
SenderThe business number’s PHONE_NUMBER_ID—
Recipient (to)Someone else’s personal WhatsApp or another SIMThe business number itself
Replying to a customermessages[].from or contacts[].wa_idmetadata.display_phone_number
Campaign listWithout the business numberIncluding the business number

If you’re just getting started and want to know what you can test without paying, see WhatsApp API free trial.

What if the number is different and the error persists?

If you’re sure to holds another number and you still get 131021, check:

  • whether the PHONE_NUMBER_ID in the URL really belongs to the number you think (on accounts with multiple numbers, using another number’s ID is a common slip);
  • whether your normalization is stripping digits and turning two similar numbers into one;
  • whether a production environment variable is overriding the test one.

If none of that explains it, save the fbtrace_id from the response and open a support ticket. Broader parameter errors have their own guide: errors 131008 and 131009.

How to do this with Vectalk

Vectalk is a proxy for Meta’s official Cloud API: send payloads and webhooks are the same as in Meta’s documentation, so 131021 arrives with the same code and the same rule applies. In the dashboard, the instances area shows the IDs and profile of the connected number and includes a test message option: use a recipient different from the instance’s number. The logs help you see which recipient was used on each send.

For your first API send, follow getting started with Vectalk and the documentation. For the big picture, read our official WhatsApp API guide. To get started, create your account.

Frequently asked questions

What does WhatsApp error 131021 mean?

That the message recipient is the same business number that’s sending it. Meta asks you to send to a number different from the sender.

Can I message myself through the API to test?

Not from the same number. Use a different personal WhatsApp as the recipient. In Meta’s Get Started guide, the recipient is your personal WhatsApp, which is a different number.

I use coexistence. Can I test by sending from the API number to the same number in the app?

No. With coexistence, the WhatsApp Business app and the API share the same number, so it’s still sender equals recipient. Test with another device.

Should I retry on 131021?

No. The error isn’t transient. Fix the recipient or drop the send.

Am I charged for a 131021?

No. According to Meta’s pricing page, businesses are only charged when a message is delivered, and a message rejected with this error is never delivered. For the pricing model in Brazil, see our WhatsApp API pricing guide.


Official sources checked on November 10, 2026: Cloud API error codes, Cloud API Get Started, Business phone numbers, Pricing, Vectalk documentation.

Try the official WhatsApp API today

Create your account, generate a token and send your first message with the quick-start guide. Same payloads and webhooks as Meta's Cloud API.