Getting started
Quickstart
From a new account to your first successful verification, with a test key and at no cost.
Create a project and a test key
- Sign up in the Watsy dashboard and create a project.
- Under API keys, create a key of type test.
- Copy it now: it is shown only once. It starts with
wsy_test_.
Keep the key in a server environment variable. Never put it in a mobile app, a web page or a public repository.
Register a test number
Under Test numbers, add your number. Test keys only send to these numbers, and the code is always zeros:
000000.Send your first code
curl -X POST https://watsy.me/v1/verify \ -H "Authorization: Bearer $WATSY_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: quickstart-1" \ -d '{ "phone": "07701234567" }'The
201response carries the verificationidand"mode": "test". Keep theidfor the next step.Check the code
curl -X POST https://watsy.me/v1/verify/5d3c1f0e-7a1b-4c55-9a7e-2f1d6b0c9e11/check \ -H "Authorization: Bearer $WATSY_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: quickstart-1-check" \ -d '{ "code": "000000" }'If you get
"valid": true, the integration works. Decide on that field only.Go live
Top up your balance, create a live key (
wsy_live_) and swap it in for the test key. Nothing else changes in your code.