Tài khoản
Thông tin tài khoản BankOpenAPI sở hữu API key đang dùng. Gọi endpoint này để kiểm tra khóa đúng và còn hiệu lực.
Đối tượng account
Các trường
objectstringLuôn là"account".idstringID tài khoản BankOpenAPI của chủ API key.emailstringEmail đăng nhập (đã xác minh).namestringHọ tên trong hồ sơ.createdAtstringThời điểm tạo tài khoản, ISO 8601 (UTC).
{
"object": "account",
"id": "Xq7oT2mB9kLr4VnC8pWzA1sD3fGhJ6uE",
"email": "dev@example.com",
"name": "Nguyễn Văn An",
"createdAt": "2026-11-04T08:15:30.000Z"
}Xem tài khoản
GET/v1/account
Không có tham số. Trả đối tượng account của chủ API key.
Lỗi
401 INVALID_API_KEYThiếu, sai, đã thu hồi hoặc đã hết hạn API key.429 RATE_LIMITEDQuá giới hạn request. Xem Giới hạn tần suất.
curl https://app.bankopenapi.com/api/v1/account \
-H "Authorization: Bearer $BANKOPENAPI_API_KEY"const res = await fetch("https://app.bankopenapi.com/api/v1/account", {
headers: {
Authorization: `Bearer ${process.env.BANKOPENAPI_API_KEY}`,
},
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(data);<?php
$ch = curl_init('https://app.bankopenapi.com/api/v1/account');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('BANKOPENAPI_API_KEY'),
],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status >= 400) {
throw new Exception($data['error']['code'] . ': ' . $data['error']['message']);
}
print_r($data);import os
import requests
res = requests.get(
"https://app.bankopenapi.com/api/v1/account",
headers={"Authorization": f"Bearer {os.environ['BANKOPENAPI_API_KEY']}"},
timeout=15,
)
data = res.json()
if not res.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data){
"object": "account",
"id": "Xq7oT2mB9kLr4VnC8pWzA1sD3fGhJ6uE",
"email": "dev@example.com",
"name": "Nguyễn Văn An",
"createdAt": "2026-11-04T08:15:30.000Z"
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Thiếu API key. Gửi kèm header \"Authorization: Bearer <API key>\"."
}
}