Skip to content

Connect WhatsApp

Verify the code

Sends the code to Meta and returns the number’s verification status.

POST/api/v1/channel/{id}/verify-code
  • Console only: owner or admin
  • Workspace: X-Tenant-ID

Path parameters

  • iduuidrequired

    Channel id (from channels[].id).

    Example
    b4c5d6e7-f809-41a2-b3c4-d5e6f7081920

Headers

  • Cookiestringrequired

    The whatsappx_session cookie the app sets when you sign in. Browsers send it automatically; API keys are not accepted on this endpoint.

    Example
    whatsappx_session=…
  • X-Tenant-IDuuidrequired

    Workspace id. Required for session requests. You can pass ?tenant=<id> instead.

    Example
    8d0f6c2e-3b1a-4c55-9a7e-2f4b6d1e9c30

Body

application/json
  • codestringrequired

    The code from the SMS or voice call.

    Constraints
    4–8 digits.
    Example
    123456

Response

200 OKapplication/json

  • channel_iduuid

    Channel id.

  • phone_idstring

    Meta phone number id.

  • waba_idstring

    WhatsApp Business Account id.

  • phonestring

    Saved phone number.

  • statusenum

    Meta’s code_verification_status: VERIFIED, EXPIRED, NOT_VERIFIED or UNKNOWN.

  • verifiedboolean

    true when the number is verified.

  • display_phone_numberstringmay be absent

    Phone number as Meta displays it.

Status codes

  • 200OK. The verification status after the check.
  • 400Bad request. enter the verification code from SMS or voice (format), Meta rejected that verification code. Request a new code and try again, or invalid request.
  • 401Unauthorized. No signed-in session (unauthorized).
  • 403Forbidden. API keys can never call this endpoint (API keys cannot administer workspaces). A signed-in user who is not an owner or admin gets admin required; a user who is not a member of the workspace gets forbidden.
  • 404Not found. No Cloud API channel with this id in the workspace.
  • 502Bad gateway. Meta returned a server error. Errors coming from Meta add meta_code, meta_subcode and meta_title when Meta provides them.