Verify HMAC proof
curl --request POST \
--url https://verify-api.smsmanager.com/v1/verify-proof \
--header 'Content-Type: application/json' \
--data '
{
"phoneNumber": "1234567890",
"token": "61591bd88d8f...",
"code": "123456",
"timestamp": "2024-01-15T10:30:00Z",
"proof": "a1b2c3d4e5f6..."
}
'import requests
url = "https://verify-api.smsmanager.com/v1/verify-proof"
payload = {
"phoneNumber": "1234567890",
"token": "61591bd88d8f...",
"code": "123456",
"timestamp": "2024-01-15T10:30:00Z",
"proof": "a1b2c3d4e5f6..."
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
phoneNumber: '1234567890',
token: '61591bd88d8f...',
code: '123456',
timestamp: '2024-01-15T10:30:00Z',
proof: 'a1b2c3d4e5f6...'
})
};
fetch('https://verify-api.smsmanager.com/v1/verify-proof', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://verify-api.smsmanager.com/v1/verify-proof",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phoneNumber' => '1234567890',
'token' => '61591bd88d8f...',
'code' => '123456',
'timestamp' => '2024-01-15T10:30:00Z',
'proof' => 'a1b2c3d4e5f6...'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://verify-api.smsmanager.com/v1/verify-proof"
payload := strings.NewReader("{\n \"phoneNumber\": \"1234567890\",\n \"token\": \"61591bd88d8f...\",\n \"code\": \"123456\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"proof\": \"a1b2c3d4e5f6...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://verify-api.smsmanager.com/v1/verify-proof")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumber\": \"1234567890\",\n \"token\": \"61591bd88d8f...\",\n \"code\": \"123456\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"proof\": \"a1b2c3d4e5f6...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verify-api.smsmanager.com/v1/verify-proof")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"phoneNumber\": \"1234567890\",\n \"token\": \"61591bd88d8f...\",\n \"code\": \"123456\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"proof\": \"a1b2c3d4e5f6...\"\n}"
response = http.request(request)
puts response.read_body{
"valid": true
}Verify API
Verify HMAC proof
Verifies an HMAC proof for phone validation without storing any state. This endpoint is useful for backend verification when you have all the validation data but want SMS Manager to verify the HMAC calculation.
This endpoint not requires authentication - proof itself is the authentication.
All of these data are returned by the /v1/validations endpoint.
Note: This only works for accounts with a verificationSecret configured.
POST
/
v1
/
verify-proof
Verify HMAC proof
curl --request POST \
--url https://verify-api.smsmanager.com/v1/verify-proof \
--header 'Content-Type: application/json' \
--data '
{
"phoneNumber": "1234567890",
"token": "61591bd88d8f...",
"code": "123456",
"timestamp": "2024-01-15T10:30:00Z",
"proof": "a1b2c3d4e5f6..."
}
'import requests
url = "https://verify-api.smsmanager.com/v1/verify-proof"
payload = {
"phoneNumber": "1234567890",
"token": "61591bd88d8f...",
"code": "123456",
"timestamp": "2024-01-15T10:30:00Z",
"proof": "a1b2c3d4e5f6..."
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
phoneNumber: '1234567890',
token: '61591bd88d8f...',
code: '123456',
timestamp: '2024-01-15T10:30:00Z',
proof: 'a1b2c3d4e5f6...'
})
};
fetch('https://verify-api.smsmanager.com/v1/verify-proof', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://verify-api.smsmanager.com/v1/verify-proof",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phoneNumber' => '1234567890',
'token' => '61591bd88d8f...',
'code' => '123456',
'timestamp' => '2024-01-15T10:30:00Z',
'proof' => 'a1b2c3d4e5f6...'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://verify-api.smsmanager.com/v1/verify-proof"
payload := strings.NewReader("{\n \"phoneNumber\": \"1234567890\",\n \"token\": \"61591bd88d8f...\",\n \"code\": \"123456\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"proof\": \"a1b2c3d4e5f6...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://verify-api.smsmanager.com/v1/verify-proof")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumber\": \"1234567890\",\n \"token\": \"61591bd88d8f...\",\n \"code\": \"123456\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"proof\": \"a1b2c3d4e5f6...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verify-api.smsmanager.com/v1/verify-proof")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"phoneNumber\": \"1234567890\",\n \"token\": \"61591bd88d8f...\",\n \"code\": \"123456\",\n \"timestamp\": \"2024-01-15T10:30:00Z\",\n \"proof\": \"a1b2c3d4e5f6...\"\n}"
response = http.request(request)
puts response.read_body{
"valid": true
}Body
application/json
The normalized phone number
Example:
"1234567890"
The validation token
Example:
"61591bd88d8f..."
The 6-digit verification code
Example:
"123456"
The timestamp when validation started
Example:
"2024-01-15T10:30:00Z"
The HMAC proof to verify
Example:
"a1b2c3d4e5f6..."
Was this page helpful?
⌘I