Authentication API
Use the Authentication API to authenticate a user and retrieve a JWT access token.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/auth/v1/login/ |
| Method | POST |
| Content-Type | application/json |
| Authentication Required | No |
Request headers
| Header | Value |
|---|---|
| Content-Type | application/json |
Request body parameters
| Field | Type | Description |
|---|---|---|
| username | string | Your RML Connect username. |
| password | string | Your RML Connect password. |
Request body
{
"username": "XXXXXX",
"password": "XXXXXX"
}Response
Returns authentication details, including a JWT access token and user information.
{
"JWTAUTH": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZGVtbyIsInVzZXJuYW1lIjoiZGVtbyIsImadcgdrgvyX2lkIjoiOWlyNURnN2J2c0NBIiwic2VuZF9tZXNzYWdlIjpmYWxzZSwicmVzZWxsZXIiOmZhbHNlfQ.tYdhwYIF48p0DpYDYip_V_8L_2htOZH8Gx3JD1f_hXk",
"user_data": {
"additional_phone_numbers": [
"{phone}"
],
"child_user": false,
"email": "[email protected]",
"first_name": "RML",
"ip": "1stepauth",
"is_active": true,
"is_reseller": false,
"is_staff": false,
"last_name": "Product",
"parent_username": "",
"password_reset": false,
"phone_number": "+{phone}",
"reseller_username": null,
"username": "xxxxxxxx"
}
}Response schema
| Field | Type | Description |
|---|---|---|
| JWTAUTH | string | JWT access token returned after successful authentication. |
| user_data | object | User details associated with the authenticated account. |
user_data fields
| Field | Type | Description |
|---|---|---|
| additional_phone_numbers | array | Additional phone numbers associated with the user. |
| child_user | boolean | Indicates whether the user is a child user. |
| string | Email address associated with the user. | |
| first_name | string | User's first name. |
| ip | string | IP or authentication source value. |
| is_active | boolean | Indicates whether the user is active. |
| is_reseller | boolean | Indicates whether the user is a reseller. |
| is_staff | boolean | Indicates whether the user is a staff user. |
| last_name | string | User's last name. |
| parent_username | string | Parent username, if applicable. |
| password_reset | boolean | Indicates whether password reset is required. |
| phone_number | string | Primary phone number associated with the user. |
| reseller_username | string or null | Reseller username, if applicable. |
| username | string | Username of the authenticated user. |
Error responses
The current page does not define specific error response payloads for this endpoint.
Session and token handling
- Tokens are usually time-bound:
1Hour. - Handle token expiration by refreshing the token or prompting the user to log in again.
- Store tokens securely.
- Avoid exposing tokens in URLs or client-side code.
Updated 11 days ago
Did this page help you?