API giả lập lỗi thông tin đăng nhập
POSThttps://sandbox.bankhub.dev/sandbox/grant/reset-login
API giả lập lỗi thông tin đăng nhập, như: sai thông tin username/password, cần xác thực thiết bị và chặn đăng nhập từ website.
Request
Responses
- 200
- 401
- 403
Thành công
Unauthorized
Permission denied.
Authorization: x-client-id
name: x-client-idtype: apiKeydescription: Mã của đối tác được bankHub.dev cung cấp. Liên hệ https://bankhub.dev để đăng ký và được hỗ trợ.in: header
name: x-secret-keytype: apiKeydescription: Mã bảo mật đối tác được bankHub.dev cung cấp. Liên hệ https://bankhub.dev để đăng ký và được hỗ trợ.in: header
name: Authorizationtype: apiKeydescription: Mã truy cập của mỗi phân quyền.in: header
- python
- curl
- csharp
- go
- nodejs
- ruby
- php
- java
- powershell
- dart
- javascript
- c
- objective-c
- ocaml
- r
- swift
- kotlin
- rust
- HTTP.CLIENT
- REQUESTS
import http.client
import json
conn = http.client.HTTPSConnection("sandbox.bankhub.dev")
payload = json.dumps({
"errorCode": "OTP_REQUIRED"
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-client-id': '<x-client-id>',
'x-secret-key': '<x-client-id>',
'Authorization': '<x-client-id>'
}
conn.request("POST", "/sandbox/grant/reset-login", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
ResponseClear