僅獨立解決方案
無縫授權僅適用於獨立的 B2COPY 解決方案。
無縫授權允許客戶端透過傳回嵌入授權令牌的 Web UI URL 來從 CRM 移動到 B2COPY Web UI ,而無需重新輸入憑證。
步驟 1 — 取得金鑰並重新導向 URL
- 在Back Office中,前往系統→設定。
- 開啟 Side Auth 部分並複製 Secret Key 和 Redirect URL 值。
保留密鑰設定
如果「密鑰」欄位為空,請設定一個值並儲存。在「設定」頁面上編輯和儲存其他欄位可以重置它 - 如果發生這種情況,請重新輸入。
步驟 2 — 取得授權 URL
POST [host]/api/v1/standalone/auth/getAuthUrl| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| account_id | 字串 | 是的 | MT 客戶帳號登入。 |
| secret_key | 字串 | 是的 | 從 Back Office 複製的金鑰。 |
| investment_platform_id | 字串 | 是的 | 投資平台實例(單一 MT 伺服器為 1 個)。 |
curl --location --request POST 'https://host.name/api/v1/standalone/auth/getAuthUrl' \
--data-raw '{
"account_id": "77632289",
"secret_key": "Password1234!",
"investment_platform_id": "1"
}'回應
帶有嵌入令牌的 Web UI URL,格式為 https://{domain_name}/{token}。
{
"status": 200,
"data": {
"url": "https://my4.b2copy-demo.com/f5f9470def7b9b9b96b2427a6ebbd8c2"
}
}