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

WhatsApp & APIs·· 37 views· 3 min read

The short answer: the key you type in the Playground stays only in the memory of the open page. It is not saved, it never goes in the address, and it is wiped when you leave the page. Even so, use a sandbox_ key to practise: writes are simulated and never charge.

What happens to the key

Question Answer
Where does it stay? Only in the memory of the page you have open.
Is it saved? No.
Does it go in the page address? Never.
What if I reload or change page? It is wiped, and you type it again.
Does it appear in the generated code? No. The code always shows the placeholder YOUR_API_KEY, which you replace with your key in your program.
Is it kept in the history? No. The history keeps only the request and the response status.

sandbox_ or prod_

sandbox_ key prod_ key
Reads Real account data Real account data
Writes Simulated Change the account
Charges Never Yes, within the key spending limit

The Playground only accepts keys starting with sandbox_ or prod_. The difference between the two modes is explained in Sandbox and Production.

The warning for prod_ keys

If you type a prod_ key, the page shows a warning and only sends the request once you tick "I understand that this request changes the real account". That is deliberate: one extra click beats a domain renewed or an invoice paid by mistake.

A sandbox_ key also reads real data from your account. Look after it as carefully as a prod_ key. And type the key only in the "API key" field: in a header, the page refuses it.
On a shared computer, close the tab when you finish. If the key is exposed, revoke it straight away on the API page in My MozOut and create another: what to do, in the right order.

No sandbox_ key yet? Create one in My MozOut, on the API page.

Open the API page

SEE ALSO

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

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

An API key or token has leaked: what to do, in the right order

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

Code examples in our API docs: curl, PHP, Python and JavaScript, ready to copy and adapt

RECOMMENDED PRODUCT

Web hosting with cPanel

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

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