Authentication API

Use the Authentication API to authenticate a user and retrieve a JWT access token.

Endpoint details

FieldValue
URLhttps://apis.rmlconnect.net/auth/v1/login/
MethodPOST
Content-Typeapplication/json
Authentication RequiredNo

Request headers

HeaderValue
Content-Typeapplication/json

Request body parameters

FieldTypeDescription
usernamestringYour RML Connect username.
passwordstringYour 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

FieldTypeDescription
JWTAUTHstringJWT access token returned after successful authentication.
user_dataobjectUser details associated with the authenticated account.

user_data fields

FieldTypeDescription
additional_phone_numbersarrayAdditional phone numbers associated with the user.
child_userbooleanIndicates whether the user is a child user.
emailstringEmail address associated with the user.
first_namestringUser's first name.
ipstringIP or authentication source value.
is_activebooleanIndicates whether the user is active.
is_resellerbooleanIndicates whether the user is a reseller.
is_staffbooleanIndicates whether the user is a staff user.
last_namestringUser's last name.
parent_usernamestringParent username, if applicable.
password_resetbooleanIndicates whether password reset is required.
phone_numberstringPrimary phone number associated with the user.
reseller_usernamestring or nullReseller username, if applicable.
usernamestringUsername 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.


Did this page help you?