WhatsApp Cloud API Skill

Use this skill to run WhatsApp Business Platform Cloud API operations through uxc + OpenAPI.

Reuse the uxc skill for shared execution, auth, and error-handling guidance.

Prerequisites

Scope

This skill covers a compact Cloud API request/response surface:

This skill does not cover:

API Version

This skill is pinned to Graph API v25.0, based on current Meta developer examples at implementation time. Keep the base URL versioned:

If Meta deprecates this version later, the wrapper should be revised in a follow-up update rather than assuming unversioned compatibility.

Authentication

WhatsApp Cloud API uses Authorization: Bearer <access_token>.

Configure one bearer credential and bind it to the versioned Graph API base path:

uxc auth credential set whatsapp-cloud \
  --auth-type bearer \
  --secret-env WHATSAPP_CLOUD_ACCESS_TOKEN

uxc auth binding add \
  --id whatsapp-cloud \
  --host graph.facebook.com \
  --path-prefix /v25.0 \
  --scheme https \
  --credential whatsapp-cloud \
  --priority 100

Validate the active mapping when auth looks wrong:

uxc auth binding match https://graph.facebook.com/v25.0

Core Workflow

  1. Use the fixed link command by default:

    • command -v whatsapp-openapi-cli
    • If missing, create it: uxc link whatsapp-openapi-cli https://graph.facebook.com/v25.0 --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/whatsapp-openapi-skill/references/whatsapp-cloud.openapi.json
    • whatsapp-openapi-cli -h
  2. Inspect operation schema first:

    • whatsapp-openapi-cli get:/{waba_id}/phone_numbers -h
    • whatsapp-openapi-cli get:/{phone_number_id}/whatsapp_business_profile -h
    • whatsapp-openapi-cli post:/{phone_number_id}/messages -h
  3. Prefer read/setup validation before writes:

    • whatsapp-openapi-cli get:/{waba_id}/phone_numbers waba_id=123456789012345
    • whatsapp-openapi-cli get:/{phone_number_id} phone_number_id=123456789012345
    • whatsapp-openapi-cli get:/{phone_number_id}/whatsapp_business_profile phone_number_id=123456789012345
  4. Execute with key/value or positional JSON:

    • key/value: whatsapp-openapi-cli get:/{phone_number_id} phone_number_id=123456789012345 fields=display_phone_number,verified_name
    • positional JSON: whatsapp-openapi-cli post:/{phone_number_id}/messages '{"phone_number_id":"123456789012345","messaging_product":"whatsapp","to":"15551234567","type":"text","text":{"body":"Hello from UXC"}}'

Operation Groups

Asset Discovery

Business Profile

Messaging

Guardrails

References