Query Trusted Devices
Query the list of trusted devices used for 2FA by the current user.
Request URL
GET {base_url}/uc-auth/api/v1/mfa/trusted-devices
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Array<Trusted_Device> | The list of trusted devices used for 2FA by the current user. |
- Trusted_Device
-
Parameter Type Description deviceTokenHash String The hash of the trusted device. deviceName String The name of the trusted device. egressIp String The egress IP address of the trusted device. addedTime Integer The time when the device was added as a trusted device, in Unix timestamp format (milliseconds). lastLoginTime Integer The last login time of the device, in Unix timestamp format (milliseconds). expireTime Integer The expiration time of the trusted device, in Unix timestamp format (milliseconds). current Boolean Whether the device is the one that initiated the request.
true: The device is the current device.false: The device is not the current device.
Example
Request example
GET /uc-auth/api/v1/mfa/trusted-devices HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIxMDAwQGNvbG9ydGVzdDIiLCJncmFudF90eXBlIjoibWZhIiwidXNlcl9uYW1lIjoiMTAwMEBjb2xvcnRlc3QyIiwic2NvcGUiOlsicmVhZCIsIndyaXRlIl0sImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrqHnkIblkI7lj7BXZWLlupTnlKgiLCJwbGF0Zm9ybSI6IndlYiJ9LCJleHAiOjE3OTE4ODQ4MTEsImlhdCI6MTc5MTg2MzIxMSwianRpIjoiNzNkNWM5ZDgtMzZmZC00MjgxLWIyMTAtZmM5MTZkMWY1N2I3IiwiY2xpZW50X2lkIjoibm92by1hZG1pbi13ZWIiLCJzaWQiOiI5YzQzMDQ1NS04MjAyLTRmYTgtOTI3Mi05Y2NkNzE2ZGVmMDAiLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbMTAyXSwicHVpZCI6MzA3NjkxMzY0NDkxNTk5ODcyMCwidGVuYW50SWQiOjIwNzk1MDQyMDUzMDkxOTQyNDEsInBhcmVudFVjSWQiOjMwNzY5MTM2NDQ4OTA4MzI4OTYsInRlbmFudENvZGUiOiJjb2xvcnRlc3QyIiwidHlwZSI6IlRfVVNFUiIsInVzZXJJZCI6MjA3OTc0NjkxNTM4ODA3NjAzMywiZW1haWwiOiJsZW9Ac2FtcGxlLmNvbSIsInVzZXJuYW1lIjoiMTAwMEBjb2xvcnRlc3QyIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.t96e4ew1_H3q7-EN24Q39-JAI7QfXU6aOuYTEBwEr1GXF3bygIim66ykJ1A9UQBXdS_TAHpdKhwcnMkxVqQ_cEZLtpichmD2sIr-13Wxsg9d5FtA-ymKCZIyim53byanYOkHWlQA2g-ocw50TSvmCOLUNLp_BvhqO99Fg9K49eGl10MG5za3nk4zn88RHkHUUFblWNkkZxE4F62mCIBO8qO--A2J24C5B1Q1S9KwlrnpEMopFB0aLtillBEPFz1HdrgYaA82t1HoVeGEbO376ZMguxk1apq8g2Zlv-XiWngutVGrSRvGZxqzu6LsZHqjT4F2YrIUSufYvUh-cs0eow
Response example
HTTP/1.1 200 OK { "result": [ { "deviceTokenHash": "2f48c053fea8b2bf909772ae6e7b5de2bf0844a60937873151dd6deee48c503b", "deviceName": "unknown, other", "egressIp": "103.84.136.171", "addedTime": 1791863211501, "lastLoginTime": 1791863211501, "expireTime": 1807415211501, "current": false } ], "requestId": "09c5531004036ca13c4857ba186b9293", "code": "200", "message": "SUCCESS" }