---
title: Login
slug: suite-documentation/login
docTags: 
createdAt: 2025-11-16T18:20:11.896Z
---

The endpoint enables users to authenticate and acquire an access token. The access token is necessary to make authorized requests to secured endpoints in the system.

### Endpoint Information

- **URL**: https\://account.testinium.com/uaa/oauth/token
- **Method**: POST
- **Header**: Basic Authentication (\<username> and \<password>)
- **Content-Type**: application/x-www-form-urlencoded

### Request Parameters

To obtain an access token, the following **form-data parameters** are required:

| **Parameter** | **Type** | **Required** | **Description**                                     |
| ------------- | -------- | ------------ | --------------------------------------------------- |
| grant\_type   | String   | Yes          | The grant type, typically <br />password.           |
| username      | String   | Yes          | The user's username.                                |
| password      | String   | Yes          | The user's account password.                        |
| scope         | String   | No           | The scope of access for the token, e.g., <br />api. |

### Response

Upon a successful request, the server returns a response containing the access token and additional token information. This token is required for subsequent API calls.

```json
{
  "access_token": "your-access-token",
  "token_type": "bearer",
  "refresh_token": "your-refresh-token",
  "expires_in": 3600,
  "scope": "openid",
  "jti": "unique-token-identifier"
}
```

### Response Fields

| **Field**      | **Type** | **Description**                                    |
| -------------- | -------- | -------------------------------------------------- |
| access\_token  | String   | Token for authenticating API requests.             |
| token\_type    | String   | Type of token, usually bearer.                     |
| refresh\_token | String   | Token to refresh the access token upon expiration. |
| expires\_in    | Number   | Time in seconds until the access token expires.    |
| scope          | String   | The scope of the token's granted access.           |
| jti            | String   | Unique identifier for the token.                   |

### Error Codes

The following error codes may be encountered during token generation

| **HTTP Code** | **Error Message**       | **Description**                                     |
| ------------- | ----------------------- | --------------------------------------------------- |
| 400           | INVALID\_REQUEST        | The request is invalid or missing parameters.       |
| 401           | INVALID\_CLIENT         | The \<username> or \<password> is incorrect.        |
| 403           | ACCESS\_DENIED          | Authentication failed due to incorrect credentials. |
| 500           | INTERNAL\_SERVER\_ERROR | An unexpected error occurred on the server.         |

### Example Request

Below is an example of a curl command to obtain an access token:

```shell
curl --location 'https://account.testinium.com/uaa/oauth/token' \
--header 'Authorization: Basic dGVzdGluaXVtU3VpdGVUcnVzdGVkQ2xpZW50OnRlc3Rpbml1bVN1aXRlU2VjcmV0S2V5' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username= <username>' \
--data-urlencode 'password= <password>'
```

