/user
POST
Token required
User details
Fetch the logged-in user’s profile and balances using your API Token.
Endpoint URL
https://databoomnigeria.ng/api/user
Base: https://databoomnigeria.ng/api + Path: /user
Key notes
- Your API token identifies your account (only active accounts can call private endpoints).
- Response formats monetary values with 2 decimal places (string).
Headers
| Header | Value | Notes |
|---|---|---|
| Authorization | Token {TOKEN} | Alternative: send the header as Token: {TOKEN} |
| Content-Type | application/json | Required |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
| (none) | - | This endpoint only needs your token header. Body is optional. |
Code examples
curl -X POST "https://databoomnigeria.ng/api/user" \
-H "Content-Type: application/json" \
-H "Authorization: Token YOUR_TOKEN"
$url = "https://databoomnigeria.ng/api/user";
$token = "YOUR_TOKEN";
$payload = null;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Token YOUR_TOKEN",
]);
$resp = curl_exec($ch);
$err = curl_error($ch);
curl_close($ch);
if ($err) { die($err); }
header("Content-Type: application/json");
echo $resp;
const url = "https://databoomnigeria.ng/api/user";
const token = "YOUR_TOKEN";
const payload = null;
const res = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Token YOUR_TOKEN",
},
body: JSON.stringify(payload),
});
const data = await res.json();
console.log(data);
import requests, json
url = "https://databoomnigeria.ng/api/user"
headers = {"Content-Type": "application/json"}
headers["Authorization"] = "Token YOUR_TOKEN"
payload = None
r = requests.post(url, headers=headers, json=payload, timeout=60)
print(r.status_code)
print(r.text)
Responses
Success
200
- data.name = {sLname} {sFname}
- data.balance = your wallet balance (formatted)
- data.referral_balance = your referral wallet balance (formatted)
{
"status": "success",
"data": {
"name": "Doe John",
"balance": "1200.50",
"referral_balance": "80.00",
"email": "john@example.com",
"phone": "08012345678"
}
}
Fail
401
{
"status": "fail",
"msg": "Your authorization token is required."
}