Obtaining the User Token of an Exclusive ServiceComb Engine
Function
This API is intended only for exclusive ServiceComb engines with security authentication enabled.
Before accessing APIs of an exclusive ServiceComb engine with security authentication enabled, you need to call this API to obtain a user token. This token is the unique credential for accessing the APIs.
The token must be contained in the request header when an access request is sent. The format is as follows:
Authorization:Bearer{Token}
Restrictions
None
URI
POST /v4/token
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Account name. |
password |
Yes |
String |
Password of the account. |
Response
Status code: 200
Parameter |
Type |
Description |
---|---|---|
token |
String |
User token, which is valid for 12 hours. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Error code. |
errorMessage |
String |
Error message. |
detail |
String |
Location details. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Error code. |
errorMessage |
String |
Error message. |
detail |
String |
Location details. |
Example Request
POST https://{Service center address}/v4/token { "name": "root", "password": "*******" }
Example Response
Status code: 200
OK
{ "token" : "****bGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50Ijoicm9vdCIsImV4cCI6MTY1MDU5MTcwMSwicm9sZXMiOlsiYWRtaW4iXX0.WKwNAjaYMMCSjNX0qCGCeyh13FJRzLousxoXlThdkMwkH- pXEmG51_SguH0LlHOZoIc8gNJq-ilQg4bxTo1s0pnQZIS3wma0qvE-MzaYnFguTuHM7rxD7eZdwnbUe3dhnw9xRqR1hcd-lTuBbLoL9fbED4U_63IoEDyBCJl9D_l0F86uGzpUysCvC-t6MrJHgi7miUaO7ZZQmSAUNhmbEoN8IIVp-QtP_cWNWtWaFO-eoQrmCT2FdlYiB9MCuELr9-5EGM_mFLPgs6E4fyIGiGHy7IwoGUKOCW5w6Jb0l-2JxeUe3eOl5Md5kzOIAE_EYUATxCbJ5GmgpSSJf*****" }
Status Code
Status Code |
Description |
---|---|
200 |
OK |
401 |
Unauthorized |
500 |
Internal Server Error |
Error Code
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