Introduction

This documentation aims to provide all the information you need to work with our API.

Endpoints

Send OTP api

POST
http://whatsappauth.sr
/api/v1/send-otp

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json
Happy-Auth-Api-Key
Example:
Your Happy-Auth-Api-Key
Happy-Auth-Api-Secret
Example:
Your Happy-Auth-Api-Secret

Body Parameters

Example request:
$client = new \GuzzleHttp\Client();
$url = 'http://whatsappauth.sr/api/v1/send-otp';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'Happy-Auth-Api-Key' => 'Your Happy-Auth-Api-Key',
            'Happy-Auth-Api-Secret' => 'Your Happy-Auth-Api-Secret',
        ],
        'json' => [
            'phone_number' => '9876543210',
            'otp' => '123456',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response:
{
     "status": OTP sent successfully.
}
{
"success": false,
"message": "Validation errors",
 "data": {
     "phone_number": [
         "The phone number field is required."
     ],
     "otp": [
         "The otp field is required."
     ],
   }
}
{
    "message": "Something went wrong."
}