Authenticate employee

Here, you can learn how to make an API call to authenticate an employee. Once you execute the call successfully, you will receive a JSON web token that permits you to make authorised API calls to other Tuum API endpoints.

Sample API call

To authenticate an employee, make the following API call.

https://auth-api.sandbox.tuumplatform.com/api/v1/employees/authorise

Learn more about the authenticate employee endpoint in the Tuum developer portal.

Sample request

Below is an example request body of the API call for authentication of an employee.

{
"username": "employee_username",
"password": "employee_password"
}

Sample response

Below you find an example response body to the API call above.

Response
{
    "errors": null,
    "validationErrors": null,
    "data": {
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHBpcnlEVGltZSI6IjIwMjMtMDMtMDhUMDg6NDg6NDkiLCJyb2xlcyI6WyJBRE1JTiJdLCJuYW1lIjoiSm9obiBPZmZpY2VyIiwiZW1wbG95ZWVJZCI6IjEiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHAiOjE2NzgyNjUzMjl9.G7rqNTJbeyMdMy1ZGwu1G7JRSvwAg084IiBYhOEz4I8"
    }
}

Result

An employee is authenticated, and a JSON Web Token is returned in the response.

In order to make authorised API calls, the JSON Web Token that was received must be used as a parameter value for the x-auth-token header parameter.

Last updated

Was this helpful?