POST
/loginUser Login
The POST /login endpoint is used to authenticate and log in a user. It allows users to provide their credentials and obtain an access token, which can be used to authorize subsequent requests to protected resources within the system.
The access token is valid for 24 hours from the time of issue.
Mandatory Fields: "handle", "password"
POST
/api/v1/loginParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
body | body | userReq | Required | User credentials |
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Success | userResp |
| 400 | Bad Request | Request data failed validation(s) | None |
| 401 | Unauthorized | Authentication Failed! | None |
| 429 | Too Many Requests | Too Many Requests. | None |
| 500 | Internal Server Error | Internal Server Error | None |
Code Samples
const inputBody = {
"handle": "myuser",
"password": "supersecret"
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('/api/v1/login', {
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});Body Parameter
{
"handle": "myuser",
"password": "supersecret"
}Example Response
200 Response
{
"error": false,
"handle": "myuser",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}Need Support?
Our team is here to help you integrate and make the most of our APIs. Get in touch for technical support, custom solutions, or any questions.