Introduction
the subscriber verification endpoint is a specific URL that allows users to verify their phone numbers by entering a code that is sent to them via SMS.
Users can access the subscriber verification endpoint by visiting the URL provided in the plugin’s settings. Once they enter the code received in SMS message, the plugin will confirm that the phone number is valid and the user will be able to receive SMS messages sent by the website administrator.
POST /wp-json/wpsms/v1/newsletter/verify?name=YourName&mobile=YourMobile&activation=ActivationCode
Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://site.com/wp-json/wpsms/v1/newsletter/verify?name=Kimberly&mobile=0911111113&activation=1857',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic ***',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response
{
"message": "Your number has been successfully subscribed.",
"error": []
}