🏦

DemoBank API

模板 参考示例

参考模板集成:OTP 登录、会话 token 与用户信息查询。请在第二步替换为真实的金融科技 App。

概览

💡

基础 URL: https://api.openbankinggateway.com — 所有响应均采用统一的 {code, data} 结构。

会话流程: 完成登录端点即可获得网关 token,随后在每个需要鉴权的端点以 token= 传入。

透明性: 每个响应(无论成功或失败)都在 data.upstream 下附带原始的上游金融科技 JSON。

在下方任意端点填入参数并点击 Send request 即可调用在线网关,或复制 curl 示例在终端中运行。

Auth

POST/api/demobank/login/request-otp

Request a login OTP for a phone number

ParameterInValue
phone*query
curl -X POST 'https://api.openbankinggateway.com/api/demobank/login/request-otp?phone=8801700000000'
POST/api/demobank/login/verify-otp

Verify the OTP and issue a session token

ParameterInValue
phone*query
otp*body
curl -X POST 'https://api.openbankinggateway.com/api/demobank/login/verify-otp?phone=8801700000000' \ -H 'Content-Type: application/json' \ -d '{"otp":"123456"}'

Account

GET/api/demobank/user-info

Fetch the logged-in user's profile (token required)

ParameterInValue
token*query
curl -X GET 'https://api.openbankinggateway.com/api/demobank/user-info?token=<token>'