Yêu cầu OTP
curl --request POST \
--url https://api.ssi.com.vn/api/v3/auth/requestOtp \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "<string>",
"apiSecret": "<string>"
}
'import requests
url = "https://api.ssi.com.vn/api/v3/auth/requestOtp"
payload = {
"apiKey": "<string>",
"apiSecret": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: '<string>', apiSecret: '<string>'})
};
fetch('https://api.ssi.com.vn/api/v3/auth/requestOtp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ssi.com.vn/api/v3/auth/requestOtp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'apiKey' => '<string>',
'apiSecret' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ssi.com.vn/api/v3/auth/requestOtp"
payload := strings.NewReader("{\n \"apiKey\": \"<string>\",\n \"apiSecret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ssi.com.vn/api/v3/auth/requestOtp")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"<string>\",\n \"apiSecret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ssi.com.vn/api/v3/auth/requestOtp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"<string>\",\n \"apiSecret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Thành công",
"transactionId": "f306c510-0647-417b-9210-bb5b7e155e77"
}{
"code": "<string>",
"msg": "<string>"
}{
"code": "<string>",
"msg": "<string>"
}{
"code": "<string>",
"msg": "<string>"
}Xác thực
Yêu cầu OTP
Gửi yêu cầu lấy OTP (SMS/Email) phục vụ xác thực giao dịch. Chỉ sử dụng cho tài khoản có kiểu 2FA là SMS và Email.
POST
/
api
/
v3
/
auth
/
requestOtp
Yêu cầu OTP
curl --request POST \
--url https://api.ssi.com.vn/api/v3/auth/requestOtp \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "<string>",
"apiSecret": "<string>"
}
'import requests
url = "https://api.ssi.com.vn/api/v3/auth/requestOtp"
payload = {
"apiKey": "<string>",
"apiSecret": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: '<string>', apiSecret: '<string>'})
};
fetch('https://api.ssi.com.vn/api/v3/auth/requestOtp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ssi.com.vn/api/v3/auth/requestOtp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'apiKey' => '<string>',
'apiSecret' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ssi.com.vn/api/v3/auth/requestOtp"
payload := strings.NewReader("{\n \"apiKey\": \"<string>\",\n \"apiSecret\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ssi.com.vn/api/v3/auth/requestOtp")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"<string>\",\n \"apiSecret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ssi.com.vn/api/v3/auth/requestOtp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"<string>\",\n \"apiSecret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Thành công",
"transactionId": "f306c510-0647-417b-9210-bb5b7e155e77"
}{
"code": "<string>",
"msg": "<string>"
}{
"code": "<string>",
"msg": "<string>"
}{
"code": "<string>",
"msg": "<string>"
}Nội dung
application/json
Phản hồi
Thành công.
Thông báo kết quả xử lý yêu cầu OTP.
Ví dụ:
"Thành công"
Mã transaction trả về khi tài khoản dùng 2FA loại SmartOTP.
Dùng mã này để gọi auth/token sau khi đã phê duyệt trên ứng dụng iBoard.
⚠️ Lưu ý: transactionId chỉ có hiệu lực trong vòng 30 giây — bạn cần thực hiện
phê duyệt giao dịch này trên ứng dụng iBoard App Mobile trong thời gian đó.
Sau khi đã phê duyệt trên mobile, cần sử dụng transactionId
để gọi API auth/token để lấy token có quyền đặt lệnh.
Ví dụ:
"f306c510-0647-417b-9210-bb5b7e155e77"