Get account details
Get authenticated user details. Request fields, response examples and integration guidance.
/user
Example request
curl --request GET \ --url "https://api.strongmb.ng/v1/user" \ --header "Authorization: Bearer $STRONGMB_API_KEY" \ --header "Accept: application/json"
// Server-side Node.js 22+; never expose your key in a browser.
async function main() {
const response = await fetch("https://api.strongmb.ng/v1/user", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.STRONGMB_API_KEY}`,
Accept: "application/json"
},
signal: AbortSignal.timeout(30000)
});
const result = await response.json();
console.log(response.status, result);
}
main().catch(console.error);
<?php
// Requires the PHP cURL extension.
$client = curl_init('https://api.strongmb.ng/v1/user');
curl_setopt_array($client, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('STRONGMB_API_KEY'),
'Accept: application/json',
],
]);
$raw = curl_exec($client);
if ($raw === false) {
throw new RuntimeException(curl_error($client));
}
$status = curl_getinfo($client, CURLINFO_HTTP_CODE);
curl_close($client);
$result = json_decode($raw, true, 512, JSON_THROW_ON_ERROR);
print_r(['http_status' => $status, 'response' => $result]);
require 'net/http'
require 'json'
uri = URI('https://api.strongmb.ng/v1/user')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'
http.open_timeout = 10
http.read_timeout = 30
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer ' + ENV.fetch('STRONGMB_API_KEY')
request['Accept'] = 'application/json'
begin
response = http.request(request)
result = JSON.parse(response.body)
puts({ http_status: response.code, response: result }.to_json)
rescue StandardError => error
warn error.message
end
import json
import os
from urllib.request import Request, urlopen
from urllib.error import HTTPError, URLError
headers = {
"Authorization": "Bearer " + os.environ["STRONGMB_API_KEY"],
"Accept": "application/json",
}
body = None
request = Request(
"https://api.strongmb.ng/v1/user",
data=body, headers=headers, method="GET"
)
try:
with urlopen(request, timeout=30) as response:
result = json.load(response)
print(response.status, result)
except HTTPError as error:
print(error.code, error.read().decode("utf-8"))
except URLError as error:
print("Network error:", error.reason)
Returns the profile and account information of the currently authenticated user.
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer YOUR_API_KEY | Required |
{
"status": true,
"message": "User details retrieved successfully",
"data": {
"account": {
"name": "Strongmb User",
"email": "[email protected]",
"phone": "0123456789",
"account_status": "active",
"kyc_status": "incomplete",
"tier": "tier 1"
}
},
"metadata": {
"code": "USER_DETAILS_RETRIEVED",
"timestamp": 1773796899,
"trace_id": "05E3F2360E"
}
}
{
"status": false,
"message": "Unauthenticated. Invalid or missing API key.",
"data": null,
"metadata": {
"code": "ERR_UNAUTHENTICATED",
"timestamp": 1773796900,
"trace_id": "A1B2C3D4E5"
}
}
Response fields and types
These fields describe the authenticated account. Use data.account.account_status to check
whether the account is active. An inactive account cannot perform other API operations. Error responses may
return data: null.
| Field path | JSON type | Meaning and handling |
|---|---|---|
status |
boolean | Request-level success flag. Check the HTTP status and metadata code as well; this flag indicates whether the account details request succeeded. |
message |
string | Human-readable description of the result. Use metadata.code for programmatic error handling instead of parsing this text. |
data |
null | object | Response data. Check the result before reading nested fields; an error may return null or validation details. |
data.account |
object | Details of the account authenticated by your secret key. |
data.account.name |
string | Name of the authenticated account holder. |
data.account.email |
string | Email address associated with the authenticated account. Treat it as personal information. |
data.account.phone |
string | Phone number of the authenticated user account. |
data.account.account_status |
string | Whether the account is active. An inactive account cannot proceed with other operations. |
data.account.kyc_status |
string | Current identity-verification status of the account. |
data.account.tier |
string | Account tier label. It can affect the limits shown on wallet records. |
metadata |
object | Diagnostic information about the response. |
metadata.code |
string | Machine-readable result code. Use it to distinguish validation, authentication and service errors. |
metadata.timestamp |
integer | Unix timestamp in seconds associated with the response. |
metadata.trace_id |
string | Correlation identifier for troubleshooting. Retain it with a redacted request when contacting support. |
Always check metadata.code; do not rely on HTTP status alone. See response codes and recommended
handling.
Questions? Let’s work through them.
Having an issue or need help with your integration? Join the Strongmb Slack community to ask questions and get assistance from our team and other developers.
Keep API keys and customer details private when sharing examples.
Experiencing a service issue? Check Strongmb’s service status for incident updates.
Did this page help you?
Up to 100 characters. Please leave out personal details, account information and API keys.