Exchange session_token for sso_ticket API
When exchanging for user information, first call this API to exchange the session_token for an sso_ticket.
Request Description
http
POST https://{your_domain}/api/v2/tenant/sso/session-token/sso-ticketRequest Example
json
{
"session_token":"iJKVWQVfFvIQWffsTlSxTf02MV3dpITu",
"operating_sys_version":"windows10.1.1",
"device_ip":"192.168.1.1",
"device_fingerprint":"156aysdna213sac",
"agent":"agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36",
"client_id":"9fIHl3Dc9ivToWLVtblrF6Sjv9Fx47JJ"
}Request Parameters
| Parameter Name | Name | Required | Type | Description |
|---|---|---|---|---|
| session_token | User token returned after login | Yes | String | The session_token after user login, used to exchange for a new session_token |
| X-operating-sys-version | Caller OS version | Yes | String | windows10.1.1 |
| X-device-fingerprint | Caller device fingerprint | Yes | String | 156aysdna213sc50 |
| X-device-ip | Caller IP | No | String | 192.168.1.2 |
| X-agent | User-Agent info | Yes | String | Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) AppleWebKit/605.1.15(KHTML, like Gecko) Mobile/15E148/HuaWei-AnyOffice/2.6.1802.0010/com.huawei.cloudlink.workplace |
| client_id | Application authorization ID | No | String | 9fIHl3Dc9ivToWLVtblrF6Sjv9Fx47JJ |
Response Example
Success Example
HTTP/1.1 200 OK
json
{
"expire":300,
"sso_ticket":"cd7UWXGMj2jtjLrjr9NxfOA50xIQ5yjn",
}Response Parameters
| Parameter Name | Name | Type | Description |
|---|---|---|---|
| expire | Expiration time | Number | |
| sso_ticket | One-time ticket | String | Exchange the session_token after user login for a one-time access ticket sso_ticket, which can be exchanged for user information |