Authorization Interface
Description
This interface is used for interface authentication.
Interface Method
POST
URL
/chatbot/serverauth/login
Request Parameters
Parameter |
Mandatory |
Type |
Length |
Description |
---|---|---|---|---|
account |
Yes |
String |
32 |
Sign-in account. |
nonce |
Yes |
String |
128 |
Original random text provided by the server, which comes from the "401 Unauthorized" message returned in the last business request. |
checksum |
Yes |
String |
512 |
Text encrypted by the client using the HMAC-SHA256 encryption algorithm based on the nonce value and local key. |
Response Parameters
Parameter |
Mandatory |
Type |
Length |
Description |
---|---|---|---|---|
token |
No |
String |
128 |
Token required by the business request interface. This parameter is mandatory when the authentication is successful. |
duration |
No |
Integer |
4 |
Token validity period, in seconds. This parameter is mandatory when the authentication is successful. |
error |
No |
String |
512 |
Error message returned when the authentication fails. The status code 401 is also returned. |
nonce |
No |
String |
128 |
Character string randomly generated by the server. This parameter is returned when the authentication fails. |
Example
- Request
{ "account":"odfs", "nonce":"*******", // Original random text provided by the server. "checksum":"0dbe11*******************0b505de" // Text encrypted by the client using the HMAC-SHA256 algorithm based on the nonce value and local key. }
- Response
{ "token":"2**************************d", "duration":3600 }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot