Introduction
Welcome to VerifiedGlobalSms API Documentation. This API is designed to help you get started with using VerifiedGlobalSms services.
This documentation aims to provide all the information you need to work with our API.
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_API_KEY}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
This API uses API key authentication.
Include your API key in the Authorization header when making requests.
To obtain an API key:
- Log in to your account on our website.
- Navigate to your user profile or dashboard.
- Copy the
API keyprovided there. - Use this key in all authenticated requests.
For example:
Authorization: Bearer your-api-key-here
You do not need to register or log in through this API. Each user manages their own authentication on their platform; our API only requires the API key for access.
User API
APIs for managing SMS activations programmatically.
Get Balance
requires authentication
Returns the current wallet balance of the user in Naira (₦).
Example request:
curl --request GET \
--get "https://verifiedglobalsms.com/api/v1/user/balance" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://verifiedglobalsms.com/api/v1/user/balance"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://verifiedglobalsms.com/api/v1/user/balance';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://verifiedglobalsms.com/api/v1/user/balance'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"status": "success",
"balance": 5000,
"currency": "NGN"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List Countries
requires authentication
Returns a list of all enabled countries and their codes.
Example request:
curl --request GET \
--get "https://verifiedglobalsms.com/api/v1/activations/countries" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://verifiedglobalsms.com/api/v1/activations/countries"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://verifiedglobalsms.com/api/v1/activations/countries';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://verifiedglobalsms.com/api/v1/activations/countries'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"status": "success",
"countries": {
"nigeria": "Nigeria",
"ghana": "Ghana",
"usa": "USA"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List Services
requires authentication
Returns available services. If country is provided, it returns services available in that specific country with Naira prices.
Example request:
curl --request GET \
--get "https://verifiedglobalsms.com/api/v1/activations/services?country=nigeria" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://verifiedglobalsms.com/api/v1/activations/services"
);
const params = {
"country": "nigeria",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://verifiedglobalsms.com/api/v1/activations/services';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'country' => 'nigeria',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://verifiedglobalsms.com/api/v1/activations/services'
params = {
'country': 'nigeria',
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
{
"status": "success",
"services": {
"whatsapp": {
"name": "WhatsApp",
"price": 250,
"currency": "NGN"
},
"facebook": {
"name": "Facebook",
"price": 180,
"currency": "NGN"
}
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Prices
Get prices for a country or a specific service in a country in Naira (₦).
Example request:
curl --request GET \
--get "https://verifiedglobalsms.com/api/v1/activations/prices?country=nigeria&service=google" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://verifiedglobalsms.com/api/v1/activations/prices"
);
const params = {
"country": "nigeria",
"service": "google",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://verifiedglobalsms.com/api/v1/activations/prices';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'country' => 'nigeria',
'service' => 'google',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://verifiedglobalsms.com/api/v1/activations/prices'
params = {
'country': 'nigeria',
'service': 'google',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200):
{
"status": "success",
"price": 350,
"currency": "NGN"
}
Example response (200):
{
"status": "success",
"prices": {
"whatsapp": 250,
"facebook": 180
},
"currency": "NGN"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Purchase Number
requires authentication
Requests a new phone number for a specific service and country.
Example request:
curl --request POST \
"https://verifiedglobalsms.com/api/v1/activations/purchase" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"service\": \"google\",
\"country\": \"nigeria\"
}"
const url = new URL(
"https://verifiedglobalsms.com/api/v1/activations/purchase"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"service": "google",
"country": "nigeria"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://verifiedglobalsms.com/api/v1/activations/purchase';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'service' => 'google',
'country' => 'nigeria',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://verifiedglobalsms.com/api/v1/activations/purchase'
payload = {
"service": "google",
"country": "nigeria"
}
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (201):
{
"status": "success",
"message": "Number purchased successfully",
"activation": {
"id": 123,
"phone_number": "+2348012345678",
"service": "google",
"country": "nigeria",
"cost": 350,
"status": "active",
"expires_at": "2024-02-07T19:20:46Z"
}
}
Example response (400):
{
"status": "error",
"message": "Insufficient balance. Required: N350.00"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Activation Status
requires authentication
Retrieves the current status of an activation, including the SMS code if received.
Example request:
curl --request GET \
--get "https://verifiedglobalsms.com/api/v1/activations/123" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://verifiedglobalsms.com/api/v1/activations/123"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://verifiedglobalsms.com/api/v1/activations/123';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://verifiedglobalsms.com/api/v1/activations/123'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200):
{
"status": "success",
"activation": {
"id": 123,
"status": "completed",
"sms_code": "123456",
"phone_number": "+2348012345678",
"expires_at": "2024-02-07T19:20:46Z",
"updated_at": "2024-02-07 19:15:46"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Cancel Activation
requires authentication
Cancels a pending activation and refunds the cost to the user's wallet.
Example request:
curl --request POST \
"https://verifiedglobalsms.com/api/v1/activations/123/cancel" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://verifiedglobalsms.com/api/v1/activations/123/cancel"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://verifiedglobalsms.com/api/v1/activations/123/cancel';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://verifiedglobalsms.com/api/v1/activations/123/cancel'
headers = {
'Authorization': 'Bearer {YOUR_API_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()Example response (200):
{
"status": "success",
"message": "Activation cancelled successfully",
"new_balance": 5350
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.