O
AccessVtu
Type to search the docs...

AccessVtu API Documentation

Everything you need to integrate airtime, data, cable TV, electricity, and exam services into your application.


Base URL

All API requests should be made to the following base URL:

Base URL https://accessvtu.com.ng/api
📘 Note
All endpoints in this documentation are relative to the base URL above. For example, /airtime maps to https://accessvtu.com.ng/api/airtime.

Authentication

The AccessVtu API uses token-based authentication. You must include your API key in the Authorization header of every request.

Getting Your API Key

  1. Log in to your AccessVtu Dashboard
  2. Navigate to Developer Tools → API Keys
  3. Generate a new API key or copy your existing one
⚠️ Important
Keep your API key secret. Do not expose it in client-side code, public repositories, or share it publicly. If your key is compromised, regenerate it immediately from your dashboard.

Authorization Header

Include your API key using the Authorization header with either the Bearer or Token prefix:

Header Type Required Description
Authorization String Required Your API key prefixed with Bearer or Token.
Content-Type String Required Must be application/json for all POST requests.
curl -X GET "https://accessvtu.com.ng/api/get-networks?service=airtime" \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Content-Type: application/json"
<?php
$url = 'https://accessvtu.com.ng/api/get-networks?service=airtime';

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Token YOUR_API_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_TIMEOUT => 30,
]);

$response = curl_exec($ch);

if (curl_errno($ch)) {
    echo 'cURL Error: ' . curl_error($ch);
}

curl_close($ch);
$data = json_decode($response, true);
print_r($data);
?>
const response = await fetch(
  'https://accessvtu.com.ng/api/get-networks?service=airtime',
  {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json',
    },
  }
);

const data = await response.json();
console.log(data);
import requests

url = 'https://accessvtu.com.ng/api/get-networks'
headers = {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
}
params = {'service': 'airtime'}

response = requests.get(url, headers=headers, params=params)
data = response.json()
print(data)

Rate Limiting

To ensure fair usage and protect our infrastructure, API requests are rate limited. If you exceed the limit, you will receive a 429 Too Many Requests response.

Plan Rate Limit Burst
Standard 100 requests/minute 120 requests
Premium 500 requests/minute 600 requests

Rate limit headers are included in every response:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1693420800

Response Format

All API responses are returned in JSON format. Every response includes a status field and relevant data or error information.

Success Response

✓ 200 OK
{
  
  "status":"success",
  "Status":"successful",
  "message":"CORPORATE 1GB Data Purchase To 09029163515 ",
  "response":"CORPORATE 1GB Data Purchase To 09029163515 "
  "api_response":"CORPORATE 1GB Data Purchase To 09029163515 "
  
  }
}

Error Response

✕ 422 Unprocessable Entity
{
   "status":"fail",
  "Status":"failed",
  "message":"CORPORATE 1GB Data Purchase To 09029163515 ",
  "response":"CORPORATE 1GB Data Purchase To 09029163515 "
  "api_response":"CORPORATE 1GB Data Purchase To 09029163515 "
}

HTTP Status Codes

The API uses standard HTTP status codes to indicate the outcome of each request.

Code Status Description
200 OK Request was successful.
201 Created Resource created successfully.
400 Bad Request The request was malformed or missing required parameters.
401 Unauthorized Invalid or missing API key.
403 Forbidden You do not have permission to access this resource.
404 Not Found The requested endpoint does not exist.
422 Unprocessable Entity Validation failed (e.g., insufficient balance, invalid phone number).
429 Too Many Requests Rate limit exceeded. Slow down and retry.
500 Internal Server Error Something went wrong on our end. Contact support.