跳轉到主要內容
此驗證方案相對簡單,允許應用程式在不使用瀏覽器的情況下,直接處理使用者名稱與密碼來登入使用者的系統。 如果為租戶設定了外部 Identity Provider,則 Resource Owner Password Credentials 驗證方案將無法使用。 若要取得 access token,請執行下列動作:
  1. 送出 POST 請求。
  2. 使用 token 端點。如果你的電子郵件地址關聯到不同租戶中的多個帳戶,且你使用此驗證方式,請使用 https://vantage-<region>.abbyy.com/auth2/{tenantId}/connect/token
  3. 使用 Content-Type 標頭並採用 application/x-www-form-urlencoded 編碼。
  4. 在請求本文中包含下列參數:
ParameterDescription
grant_type=password指定使用 password 授權類型。
scope=openid permissions global.wildcard指定權限範圍。
username and password你的登入憑證。
client_id應用程式識別碼。
client_secret應用程式的安全金鑰。
範例請求: 伺服器對你的請求所傳回的回應中將包含 access token:
{
  "access_token": "<redacted>",
  "expires_in": 2592000,
  "token_type": "Bearer",
  "scope": "openid permissions global.wildcard"
}
如需更多關於 Resource Owner Password Credentials 的資訊,請參閱此連結