Generate Token

Use this API to generate an authentication token. This token will be valid for 60 minutes. Note that you can generate or refresh a new token up to 10 times per hour. Once a new token is generated, any previously issued tokens will become invalid.

👍

Note:

Make sure the admin setting 'API Authentication' is set to 'TOKEN_AUTH', If you are using this API.

Pass the header parameters in the following format

ParameterDescription
Content-Type*Should be - "application/json"
apiKey*Provide the API key of your account. Available in CloudAgent after admin login.

Pass the BODY PARAMS in the following format:

{
    "userName": "CloudAgent username"
}

Possible Responses

User name key is invalid"{
""status"": ""false"",
""message"": ""UserName is null"",
""data"": null
}"
User name key is valid / user name value is valid"{
""token"": ""eyJhbGciOxxxxxxxxxxxxxxxxxkIiwiZXhwIjoxNzE1Nxxxxxxxxxxxxxxxxxxxxh9.Bo
aomrxxxxxxxxxxxxxxxd8JTYngDL7sE6Q"",
""message"": """"
}"
user name value is invalid"{
""status"": ""false"",
""message"": ""Invalid userName or apiKey"",
""data"": null
}"
Adding data with expired token."{
""status"": ""false"",
""message"": ""Token Expired"",
""data"": null
}"
Language
URL
Click Try It! to start a request and see the response here!