Quickstart
By the end of this page you will have sent a verification code and checked it. Nothing reaches WhatsApp and nothing is charged, so you can run it as many times as you like.
1. Get a test key
In the dashboard, go to Settings → Console → API keys and create a key.
- Set the environment to test. The key will start with
msg_test_. - Give it the
otp:sendscope.
Copy the secret when it is shown. It is shown once, and a lost secret is rotated rather than recovered. The other fields on the key — limits, expiry, sender — are covered in Set up your API access.
export MSGEASY_API_KEY=msg_test_...2. Install the SDK
3. Send a code
A test key hands you the code back, so you can finish the flow without a real phone and without a template Meta has approved.
4. Check it
That is a complete verification.
What a wrong code looks like
Not an error. The request was fine; the code was not.
Only approved means the user is verified. The other statuses are listed in
Verify a phone number.
What a real error looks like
A refusal raises an error you can catch.
By the time an exception reaches you the SDK has already retried anything worth retrying, so there is no retry loop for you to write.
Next
- Wire it into a login — the real thing, with the pitfalls.
- Write a webhook handler — including the raw-body trap.
- Set up your API access — limits, callback URL, and what changes when you swap in a live key.
- Errors — read this before you ship.