Administrator Token
Access the Login Endpoint
Section titled “Access the Login Endpoint”- To obtain an access token, you need to send a POST request to the API login endpoint. The default login endpoint is
/api/auth/login. - After sending the login request, you will receive a response from the server. The access token will be included in the response as
access_token. This token will be used to authenticate subsequent requests to the Toolzz Platform APIs. - To access protected endpoints in the APIs, you must include the access token in the authorization header of your requests. The header must be configured as follows:
Authorization: Bearer YOUR_TOKEN_HERE. - Now that you have a valid access token, you can use it to make requests to the API endpoints that provide access to the data and functionalities of your linked institution.
Request Example
Section titled “Request Example”curl --request POST \ --url https://kong.api.toolzz.com.br/api/auth/login \ --header 'Content-Type: application/json' \ --data ' { "email": "admin@institution.com", "institution_code": "subdomain-name", "password": "your_password" } 'Response Example
Section titled “Response Example”{ "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}Request Description
Section titled “Request Description”Body Parameters
Section titled “Body Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
email | String | Email of the administrator account. | Yes |
institution_code | String | Subdomain or code of the institution. | Yes |
password | String | Password for the account. | Yes |
Response Description
Section titled “Response Description”| Key | Type | Description |
|---|---|---|
access_token | String | JWT Access token used for authentication in protected endpoints. |