RocketCOMS

User Login Request

Obtain an access token for a RocketCOMS Portal user when the user logs into the Portal.

Endpoint

POST /v1/auth/login

Authorization Header

Authorization: Bearer <access_token>
or
Authorization: Basic <encodedString>
where <encodedString> is your <api-key>:<api-secret> string encoded using Base64 encoding

Request Body

email  REQUIRED

string, max length: 255, min length: 0

User’s email address.

password REQUIRED

string, max length: 255, min length: 0

User’s password.

Returns

Returns a JWT access token and refresh token. Also returns the user and Business Account information. For details, see the User object.

token

string

JWT access token.

refreshToken

string

JWT refresh token. Can be used to get a new access token.

expiry

integer (int64)

Access token expiry time (in milliseconds).

user

object

User and Business Account information. For details, see the Address object.

SAMPLE REQUEST

				
					{
  "email": "abc@business.com",
  "password": "dhy7MN@34"
}
				
			

SAMPLE RESPONSE

				
					{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  "refreshToken": "7bb95a08-c5a3-4b8f-9c1c-bbd04d32ea78",
  "expiry": 1800000,
  "user": {
    "id": "d7b0e25f-30c9-456b-b287-6b3dcaa4b8f7",
    "firstName": "John",
    "title": "Mr.",
    "signatory": true,
    "lastName": "Doe",
    "middleName": "Allan",
    "email": "abc@business.com",
    "mobileNumber": "+15555551234",
    "role": "BA_MANAGER",
    "businessAccount": {
    "id": "67b25a5e-f90a-4491-9ee4-291ff290c1fe",
    "name": "ABC Inc.",
    "legalName": "ABC Inc.",
    "operatingName": "ABC Operating",
    "legalId": "ABC 1234",
    "phoneNumber": "+15555551234",
    "email": "abc@business.com",
    "description": ""Consumer electronics",
    "website": "http://www.abc.com",
    "legalEntityType": "Corporation",
    "isActive": true,
      "address": {
        "addressType": "Work",
        "streetLine1": "123 Queen St",
        "zipCode": "10001",
        "countryCode": "US",
        "stateCode": "NY",
        "cityName": "New York"
      },
      "organizationType": "Non-profit",
      "status": "ACTIVE",
      "createdAt": "2022-04-24T16:51:03.419Zg",
      "updatedAt": "2022-04-26T16:51:03.419Z"
    },
    "address": {
      "addressType": "Work",
      "streetLine1": "123 Queen St",
      "zipCode": "10001",
      "countryCode": "US",
      "stateCode": "NY",
      "cityName": "New York"
    },
  "passwordUpdated": true,
  "deletedAt": "2022-04-28T16:51:03.419Z",
  "isEnabled": false,
  "isAccountExpired": false,
  "createdAt": "2022-04-24T16:51:03.419Z",
  "updatedAt": "2022-04-26T16:51:03.419Z"
  }
}