OTP
Send OTP
Send a one-time code.
A different 6-digit code on each listed channel; a channel that can not send is refused on its own, and nothing is charged for it. Sending again to the same number and purpose ends the open code.
Idempotency-Key?stringLength
length <= 255X-Request-Id?stringYour id for this request; it becomes the request_id of any error. Without it the server makes one.
application/json- body
identifier*stringThe phone number, E.164 or national in country.
channels*array<>Items
1 <= items <= 2purpose?stringMatch
^[a-z0-9_]{1,32}$Default
"default"ttl_seconds?integerRange
60 <= value <= 480Default
300sender_id?stringAn approved sender ID for SMS; the workspace's first one when left out.
app_name?stringMatch
^[A-Za-z0-9 ]{1,20}$language?stringDefault
"en"Value in
"en""sw"country?stringISO 3166 alpha-2 a national number is read in; the workspace's when left out.
curl -X POST 'https://v3.ghala.io/v1/otp' \ -H 'Content-Type: application/json' \ -d '{ "identifier": "string", "channels": [ "whatsapp" ]}'{ "otp_id": "54bb07c0-6b6d-4331-9eba-71e1c890eb14", "expires_at": "2019-08-24T14:15:22Z", "channels": [ { "channel": "whatsapp", "status": "queued", "code": "string", "reason": "string" } ]}