Initiate
This endpoint is the starting point of the OTP service, initiating an OTP request (message) to send it to a specific recipient.
4 or 6 digits code
4Possible values: in seconds
300Operating system of the client
OTHERPossible values: Language of the client
ENPossible values: OTP type
POST /public/otp/initiate HTTP/1.1
Host: api.marsol.ly
x-auth-token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 122
{
"phoneNumber": "text",
"length": 4,
"expiration": 300,
"clientOs": "OTHER",
"language": "EN",
"operation": "text",
"senderId": "text"
}{
"expiration": 1,
"price": 1,
"requestId": "text",
"resendToken": "text"
}Endpoint: /public/otp/initiate
Method: POST
Description: Initiate a new OTP request.
Request Body:
phoneNumber(string): The recipient phone number.length(number): The length of OTP code.expiration(number): The Expiration period of the OTP code, the expiration length could be: 120, 300, 600 second.clientOs(enum): The operating system of the client.
POST /public/otp/initiate HTTP/1.1
Host: api.marsol.ly
x-auth-token: your_api_token_here
Content-Type: application/json
{
"phoneNumbers": "text",
"length": 4,
"expiration": 300,
"clientOs": "text",
"language": "enum",
"operation": "text",
"senderId": "text"
}Response:
expiration(number): The Expiration period of the OTP code.price(number): The price of the OTP request.requestId(string): The unique identifier of the OTP request.resendToken(string): The token used to resend the OTP request.
{
"expiration": 0,
"price": 0,
"requestId": "string",
"resendToken": "string"
}Last updated