forbidden — Action not allowed

HTTP 403
Not retryable

What the API returns

{
  "error": {
    "code": "forbidden",
    "message": "You are not allowed to perform this action.",
    "request_id": "req_01JRQ8F4X9N2K7YB3C5V6W8H0T"
  }
}

Every Wapito error is this one envelope. Branch on code, which is stable; message is written for people and can be reworded; details appears only when there is something specific to say; request_id is what to quote to support.

What it means

forbidden is an HTTP 403 error from the Wapito WhatsApp API: action not allowed. The response message reads “You are not allowed to perform this action.” It is not retryable: the same request fails again until you change it. 5 endpoints can raise it, PATCH /groups/{id}/settings among them.

Why it happens

Your credential is valid but the action is not permitted. In practice this is almost always a WhatsApp-side permission rather than a Wapito one: the linked number is not an admin of the group it is trying to modify, is not the owner of the channel it is trying to post to, or is trying to touch a resource that belongs to a different channel entirely. The details.reason field names which of those applies.

How to fix forbidden

  1. Read details.reason first - it distinguishes a WhatsApp permission problem from a cross-channel access problem.

  2. For group actions, call the participants endpoint and confirm the linked number appears with an admin role before retrying.

  3. For channel posts, confirm the linked number is an owner or admin of that channel rather than merely a follower.

The same failure in other stacks

If you are moving from a library or a self-hosted gateway, this is the same failure under the name that stack gives it:

  • forbidden
  • not-authorized

Endpoints that raise it

Where you will meet it

Retry guidance

Do not retry as sent

The same request fails the same way until something changes: the body, the credential, the recipient or the state of the channel. Keep it off every retry loop, fix the cause above, and send a corrected request once.

Frequently asked questions

Why did this work yesterday and fail today?

Almost always because the linked number lost admin rights in the meantime. Another admin can demote your number at any time from their phone, and WhatsApp sends no warning. Subscribe to the group participants webhook so your system learns about the demotion instead of discovering it during a send.

Is forbidden the same as channel_locked?

No. forbidden is about this specific action on this specific resource. channel_locked means the whole channel has been put on hold - for billing or abuse reasons - so every write is refused until the hold is lifted. The two carry different reason fields for exactly this reason.

Related

Try it on your own number

Create a channel, link a WhatsApp number by QR or pairing code, and call the API in a couple of minutes. The Sandbox plan is free and needs no card.