Getting Started

Quickstart

Connect to the sandbox environment and make your first authenticated request.

Before You Start

Afrisend shares the sandbox and production base URLs, along with your credentials, during onboarding. The examples in this documentation use {{baseUrl}} in place of the base URL. For example, the login request is:

text
POST {{baseUrl}}/login

Log In

Every endpoint except login needs a bearer token.

  1. Call login with your username and password.
  2. Send the access_token from the response in the headers of every later request:
http
Authorization: Bearer <access_token>
Content-Type: application/json
bash
curl -X POST {{baseUrl}}/login \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "login@loginWithUsernameAndPassword",
    "params": { "username": "YOUR_USERNAME", "password": "YOUR_PASSWORD" },
    "id": "1"
  }'

The login response includes the token's expiry. After the token expires, requests return HTTP 401 with {"status": 401, "message": "Failed, Not authorized"}. Log in again and retry the request.

Test Data

UAT simulates subscriber lookups (getMobileSubscriberDetails and getBankSubscriberDetails). Afrisend provides:

  • A mobile number that returns a successful lookup
  • A bank account number that returns a successful lookup

Any other number or account returns a lookup error, so you can test both outcomes.

© 2026 Afrisend