Login & Token Exchange
Overview
Exchange your clientId and apiKey for a Bearer token using the company login route. The returned token provides secure, standardized authentication for all protected endpoints across the API suite and remains valid for 60 minutes.
Resource Access
- HTTP Method:
POST - Endpoint:
/banking/ibans/v2/users/login - Authentication: None required (Credentials supplied in request body)
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
Accept | application/json | Yes | Content type for the response |
Content-Type | application/json | Yes | Request body content type |
Request Body
{
"clientId": "YOUR_CLIENT_ID",
"apiKey": "YOUR_API_KEY",
"mode": "apiKey"
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
clientId | string | Yes | A unique 28-digit alphanumeric identifier assigned to your account in the developer portal. |
apiKey | string | Yes | The secret API key generated in the portal to authorize requests. |
mode | string | Yes | Must be passed as apiKey to indicate an API customer request. |
Response
Success Response (200 OK)
{
"success": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXNzaW9uSWQiOiI0NjI1YWVkOC0xMmZmLTIzMmQtZWE0OC0yYWYzMjllMGVjNTEiLCJsb2dpbk1vZGUiOiJhcGlLZXkiLCJpZCI6NTI2LCJjb21wYW55SWQiOjUyNSwicHJvZmlsZUlkIjo1MjYsInVzZXJSZWNvcmRJZCI6MTQ4LCJyb2xlIjoiTk9STUFMX0NMSUVOVCIsInJvbGVOYW1lIjoiTXVsdGkgVXNlciIsInJlZmVyZW5jZSI6IlZVLTI5MTEyMDIyLTE2MS1VMSIsImNvbXBhbnlSZWZlcmVuY2UiOiJWVS0yOTExMjAyMi0xNjEiLCJjb21wYW55TmFtZSI6IkhleVBheSIsInJhdGVMaW1pdCI6MjAwMCwiaWF0IjoxNzIxMTIwMjA3LCJleHAiOjE3MjExMjM4MDd9.nLOVQFjQuAOAjKRU5lH49BCjdKaO3OpDOwOImdHCPqg",
"companyId": "1234"
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates whether authentication succeeded (true or false). |
token | string | JWT Bearer access token valid for 60 minutes. Include in subsequent requests via Authorization: Bearer <token>. |
companyId | string | The unique company identifier associated with your credentials. |
Error Responses
- 400 Bad Request: Missing
clientId,apiKey, or invalidmode. - 401 Unauthorized: Invalid credentials, inactive client, or unauthorized IP address.
- 500 Internal Server Error: Internal platform error during authentication.
Code Examples
cURL
curl -X POST "https://api.ahrvo.network/banking/ibans/v2/users/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"clientId": "YOUR_CLIENT_ID",
"apiKey": "YOUR_API_KEY",
"mode": "apiKey"
}'
Python
import requests
url = "https://api.ahrvo.network/banking/ibans/v2/users/login"
payload = {
"clientId": "YOUR_CLIENT_ID",
"apiKey": "YOUR_API_KEY",
"mode": "apiKey"
}
headers = {
"Content-Type": "application/json",
"Accept": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
data = response.json()
if data.get("success"):
access_token = data["token"]
print("Logged in successfully! Token:", access_token[:30] + "...")
else:
print("Authentication failed:", data)
JavaScript
const response = await fetch("https://api.ahrvo.network/banking/ibans/v2/users/login", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Accept": "application/json"
},
body: JSON.stringify({
clientId: "YOUR_CLIENT_ID",
apiKey: "YOUR_API_KEY",
mode: "apiKey"
})
});
const data = await response.json();
if (data.success) {
console.log("Bearer Token:", data.token);
console.log("Company ID:", data.companyId);
}