Akedly

Send your first OTP

From an empty account to a verified code, using the V1.2 REST API. About ten minutes.

Send your first OTP

Creating the pipeline, sending an OTP, and verifying the code.


What you need

  • An Akedly account and your API key — both covered in the Quickstart
  • Somewhere to run a curl command
  • A phone number you can receive a message on

Steps

1. Create a pipeline. A pipeline decides which channels are tried, which countries you may send to, and which security layers run. Leave the version at V1.2, the default.

View in dashboardAuthentication → Pipelines

Create a pipeline and copy its Pipeline ID.

2. Check whether proof-of-work is required. Call the V1.2 challenge endpoint every time and branch on data.challengeRequired. When it is true, solve the returned challenge and keep the proof fields for the send. When it is false — for example, in dev-mode bypass or on a pipeline where PoW is disabled — do not solve or submit a proof-of-work challenge; continue with any other requirements the response specifies.

3. Send the code. Post the destination number and include the solved challenge fields only when challengeRequired was true. Akedly picks the channel — WhatsApp first, then the fallbacks your pipeline allows.

4. Verify what the user typed. Post the code back. A success response means the number is confirmed.

The exact request and response bodies for all three calls, in your language, are on the V1.2 REST API page.


When it breaks

Two failures account for most first attempts:

  • 403 USE_V1_2_ENDPOINT — the pipeline is V1.2 but the call went to the V1.0 endpoint. Version and endpoint have to match.
  • POW_CHALLENGE_EXPIRED — the challenge was solved too slowly. Its lifetime scales with difficulty and is 90 seconds at the default, not five minutes. Read expiresAt from the challenge rather than assuming.

Everything else is in the error reference.


Where to go next

Was this page helpful?