Reading the API Playground answer: status, time, remaining requests, headers and history

WhatsApp & APIs·· 30 views· 3 min read

The short answer: after you send a request in the Playground, the "Response" box shows the status, the time, the size and the requests left this minute, plus two tabs: Body and Headers. It is exactly what your program will receive.

What each part tells you

Part What it says
Status The HTTP code. 2xx means success; 4xx means something in the request, the key or the permission is not right; 5xx is a failure on the API side.
Time How long the answer took to arrive.
Size The size of the response.
Requests left this minute How many more requests the key can make before it reaches the limit.
Body The JSON response: data and meta when all goes well, error when it does not.
Headers The headers the API lets the browser read, including X-Correlation-ID.

The headers worth checking

1 X-Correlation-ID: the identifier of this request. It is what you give support if something goes wrong.
2 X-API-Mode: says sandbox or production, depending on the key.
3 X-API-Simulated: true: shows up on simulated writes, so there is no doubt that nothing changed in the account.

When it is an error

On an error, the body carries a stable code, in English, and a message for people, in the language of Accept-Language. Next to it is a "What does this error mean?" link that leads to the explanation of the code. Your program should decide based on the code, never on the message, which can change.

When there is no answer

Message What it means
"No answer from the API" A network failure, the API not being available at that address, or the browser refusing the request.
"The request took too long and was cancelled" The answer did not arrive in time. Try again.

The session history

The requests you send are listed in "History of this session", without the key. It lives only in memory: it disappears when you reload or change page, and the Clear button wipes it before then.

Asking for help? Copy the X-Correlation-ID and the time of the request. With that we can find the request without anything else, and you never need to send us your key.

Got an error you do not understand? Open a support ticket and include the X-Correlation-ID.

Open a support ticket

SEE ALSO

The API Playground: trying a real request from your browser, step by step

Your key in the API Playground: where it stays, why sandbox_ first, and the prod_ warning

Reading one API operation in our docs: permission, parameters, examples, responses and errors

From the API docs to your account panel and back: the API page, keys and support

Calling a web API from PHP with cURL and reading the JSON reply

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from R118.80/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.