Skip to main content
The WhatsApp API uses HTTP Basic authentication on every request.
  • Username: your client ID
  • Password: your API key
Most HTTP clients construct the Authorization header for you. With cURL, pass the credentials using --user:
The equivalent header has this format:
Keep your API key on the server. Do not embed it in browser code, mobile applications, public repositories, or logs. Always send requests over HTTPS.

Authentication failure

Invalid or missing credentials return HTTP 401 Unauthorized with API status code 401. See Error codes for the complete error reference.