← Blog

·

WhatsApp API Error 131031: Account Locked or Two-Step PIN Mismatch

Updated on November 4, 2026

WhatsApp Business API error 131031 means the account can’t send for one of two reasons: it has been restricted or disabled for violating a platform policy, or Meta couldn’t verify data in the request against what’s set on the account, such as an incorrect two-step verification PIN. The first is solved with diagnosis and an appeal; the second by fixing the PIN. Your first job is to figure out which one you’re dealing with.

This guide shows how to separate the two causes, query the Health Status API, appeal a restriction and change your PIN.

What Meta says about 131031

In the error codes table, 131031 is listed among the integrity errors, with two possible descriptions:

  • the WhatsApp Business Account associated with the app has been restricted or disabled for violating a platform policy;
  • Meta was unable to verify data included in the request against data set on the account, for example the two-step PIN in the request is incorrect.

For the first, Meta points to its Policy Enforcement document and the Health Status API, which may give more insight into the reason for the lock.

A close relative is error 368, which the same table describes as an account restricted or disabled for a policy violation. It has its own guide: WhatsApp API error 368.

Which case is yours? A quick test

SignalLikely cause
The error appears when registering the number (/register) or right after changing the PINWrong two-step PIN
The error appears on every send, suddenly, with no code changeAccount restricted or locked
There’s a warning in WhatsApp Manager or an email from Meta about a violationAccount restricted or locked
The Health Status API returns BLOCKED with an error on the WABA or BUSINESS entityAccount restricted or locked
Health status is AVAILABLE and the error only shows up during registrationPIN

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

Cause 1: incorrect two-step verification PIN

Two-step verification requires a 6-digit PIN every time the number is registered on the Cloud API. If the PIN sent during registration doesn’t match, you get 131031. The full registration topic is covered in how to register a phone number on the WhatsApp Cloud API.

Registration sends the PIN like this:

curl -X POST "https://graph.facebook.com/v26.0/$PHONE_NUMBER_ID/register" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "messaging_product": "whatsapp", "pin": "123456" }'

According to the registration documentation, if the number already has two-step verification enabled, pin must be the existing PIN; if not, the value you send becomes the new PIN. Be careful with repeated attempts: registration is limited to 10 requests per number in a 72-hour moving window, and going over returns error 133016 and blocks registration for 72 hours.

If you forgot the PIN

The two-step verification documentation describes the path in WhatsApp Manager:

  1. In Business Settings, open Messaging Accounts and select the account.
  2. Open its settings and go to WhatsApp Manager.
  3. Find the number, click Settings, then Two-step verification.
  4. Click Change PIN, enter the new PIN and confirm it.

Change the PIN through the API

If you have the account’s access token, you can set a new PIN:

curl -X POST "https://graph.facebook.com/v26.0/$PHONE_NUMBER_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "pin": "654321" }'

The expected response is {"success": true}. Then run registration again with the new PIN. The API has no endpoint to disable two-step verification.

Meta notes that the 6-digit PIN is being phased out gradually for eligible Cloud API numbers; if your number is already eligible, the two-step verification tab no longer appears in WhatsApp Manager.

Keep the PIN in your company’s password manager, not in a project spreadsheet. Access and PIN best practices are in WhatsApp Business account security.

Cause 2: account restricted or locked for policy

If it’s not the PIN, the account is under some policy enforcement action. The Policy Enforcement document describes an escalation ladder:

ActionWhat’s blocked
WarningNothing; it names the policy violated
1- or 3-day blockSending marketing, utility and authentication templates, and adding phone numbers
5-, 7- or 30-day blockAll messaging and adding phone numbers
Account lockAll messaging, indefinitely; only removed by a successful appeal
Permanent disablementThe account is removed after repeated warnings and restrictions

Restrictions get longer with each repeat violation, and excessive negative user feedback can also lead to limits. Severe harms, such as scams, can lead to immediate removal without warnings.

Where to find the reason

  • The Business Manager Notifications Center and a banner in WhatsApp Manager.
  • Email to every Business Manager admin (keep their contact details current).
  • The account_update webhook, which alerts you in real time, including the restriction type and duration when applicable.
  • The Health Status API, described below.

Query the Health Status API

It’s a GET on the phone number, account or template node:

curl "https://graph.facebook.com/v26.0/$PHONE_NUMBER_ID?fields=health_status" \
  -H "Authorization: Bearer $TOKEN"

The can_send_message field sums it up: AVAILABLE (all good), LIMITED (some node has restrictions) or BLOCKED (some node fails a requirement). Under entities, each node involved (PHONE_NUMBER, WABA, BUSINESS, APP) reports its own status; when a node is BLOCKED, it includes an errors list with error_code, error_description and possible_solution. A minimal handler:

import requests

def diagnose(phone_number_id, token, base="https://graph.facebook.com/v26.0"):
    r = requests.get(f"{base}/{phone_number_id}",
                     params={"fields": "health_status"},
                     headers={"Authorization": f"Bearer {token}"}, timeout=10)
    hs = r.json().get("health_status", {})
    print("can_send_message:", hs.get("can_send_message"))
    for ent in hs.get("entities", []):
        if ent.get("can_send_message") != "AVAILABLE":
            print(ent.get("entity_type"), ent.get("can_send_message"))
            for err in ent.get("errors", []):
                print("  ", err.get("error_code"), err.get("error_description"))
                print("   fix:", err.get("possible_solution"))

If the block is on the BUSINESS entity, the problem may affect the whole portfolio; see restricted or disabled Business Manager.

How to appeal

According to the Policy Enforcement document:

  1. Open Business Support Home in Meta Business Suite or Business Manager and select the messaging account.
  2. Choose the violation and click Request Review.
  3. Explain the context, add anything that helps and click Submit. The request moves to the In Review tab.

The decision arrives through Business Manager and typically takes 24 to 48 hours. The outcome is either Unchanged or Reversed; if reversed, the account returns to its previous status. Not every spam violation can be appealed; in those cases you have to wait for the restriction to end. If the appeal doesn’t solve it, go to support: see Meta WhatsApp Business support.

Fix the cause before you appeal

An appeal without changes tends to come back as a new problem. Review:

  • whether your messages have clear opt-in and whether opt-out requests are honored;
  • whether the content is allowed under the Business Messaging Policy (for example, collecting third-party debts is prohibited, while an invoice reminder to your own customer is a utility message);
  • whether marketing frequency is driving blocks and reports; your phone number quality rating shows that signal early.

The broader context of bans and restrictions is in WhatsApp API number banned.

In your code: don’t keep retrying

Like other account-level errors, 131031 isn’t solved by retrying. Pause the queue when it appears, run the health status check and notify whoever administers the account. If it only appeared during registration, treat it as a PIN issue.

With Vectalk

Vectalk instances use Meta’s official Cloud API and webhooks as documented by Meta, so the error arrives with the same code and the diagnosis above applies unchanged. In the dashboard, the instances area shows the phone number and account IDs you need for these calls, and the logs help you see when the error started. Policy restrictions are applied by Meta, and appeals go through your company’s Business Support Home. If you need help reading your case, reach out through the Help Center. General requirements are in the official WhatsApp API guide, and the technical reference is in the documentation.

Frequently asked questions

What does WhatsApp error 131031 mean?

That the account was restricted or disabled for a policy violation, or that request data doesn’t match the account, such as an incorrect two-step PIN.

How do I know whether it’s the PIN or a lock?

If the error appears when registering the number, it’s probably the PIN. If it suddenly appears on every send, check the Health Status API and Business Manager notifications for a restriction.

How long does an appeal take?

According to Meta, the decision typically arrives within 24 to 48 hours, through Business Manager.

I forgot my PIN. Will I lose the number?

No. You can change the PIN in WhatsApp Manager, under Two-step verification.

Does a locked account unlock by itself?

Temporary blocks (1 to 30 days) end when their period is over. An account lock is indefinite and is only removed by a successful appeal.


Official sources checked on November 4, 2026: WhatsApp API error codes, Policy Enforcement, Health Status API, Two-step verification, Phone number registration, 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.