Generate a QR Code for NovoOne Mobile Client Login
Generate a QR login code for a specified user to log in to NovoOne Mobile Client by scanning the QR code.
Request URL
POST {base_url}/uc-auth/api/v1/auth/qr-login-codes
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code Yes String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Query parameters
-
Parameter Required Type Description username Yes String The username of the target user, in the format extension_number@tenant_name.
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 | Object<QR_Code_Info> | The QR login code information. |
- QR_Code_Info
-
Parameter Type Description code String The QR login code. qrContent String The content encoded in the QR code. expiresAt String The expiration time of the QR login code, in Unix timestamp format (milliseconds). status String The status of the QR login code. PENDING: A valid QR login code is available.CONSUMED: The QR login code has been used to confirm the login.EXPIRED: The QR login code has expired or been cleared.
Example
Request example
POST /uc-auth/api/v1/auth/qr-login-codes?username=1000@jint HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MTg4NDU5MiwiaWF0IjoxNzkxODYyOTkyLCJqdGkiOiI5ZjNiNWNhMy03MTY5LTRmYzUtODFjYi1mMjllZTMzNWFlYjQiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.pjPynw6scP4MQGMMELoofwhcH6_SX0OMQYHcsMikWg_CXWJ8SA6GrOGzZFju1XurYurjQUDjniLSsTRfiKm-dvNo3JZImDqY7h2p7jEl7anwF_M-_kqdK0u6588jkwe0kT3h7Mz45H3VdJqUKEoN2A2u5sGRLu4DhO3a0yr5l0OVykHF8u9PqL3eT3e8tkFxGtMk8xstc8qi5Y4fgRn-1lA47UwZQp-bfrLMnxY6QMO-vElY6kOnVcjMsI32NVDg-6DpF1RWbroUD8vrubMyzUgVcIhKI7c_ZSbYIrY2r-D2sG6lxBCP4QBKfxScmYkg5WjXqL6OzaLLL6PWnSN_nw
x-tenant-code: jint
Response example
HTTP/1.1 200 OK { "result": { "code": "jMLxOFLds6eC1SP55P76zYUB1vdn3GJjFzDV0-Nst0s", "qrContent": "novoone://qr-login?code=jMLxOFLds6eC1SP55P76zYUB1vdn3GJjFzDV0-Nst0s&server=https://api.cn.novoone.com", "expiresAt": "1791949445987", "status": "PENDING" }, "requestId": "533fb742292a3713951173ac0474d3c4", "code": "200", "message": "SUCCESS" }