2. Get Token

2026-05-11

Call the login api, which expects the authorization in headers. If login is successful, you will receive an authorization token. This token you will pass to all future request which required authentication

Written by: Tarun

Overview

This endpoint authenticates users and generates a JWT (JSON Web Token) for accessing protected API resources. Upon successful authentication.

Request Details

Endpoint: {{baseURL}}/login
Method: POST
Content-Type: application/json
Body: none

curl example

curl --location --request POST 'https://p54po2thvh.execute-api.ap-south-1.amazonaws.com/login' \
--header 'Authorization: Basic ZGVtb21hbmFnZXJmbGVudDdtdEBleGFtcGxlLmNvbTplb2k2d2RsOQ=='

Authentication Requirements

Send credentials in the Authorization header:

Authorization: Basic <base64(email:password)>

Example:

Authorization: Basic ZGVtb0BleGFtcGxlLmNvbTpwYXNzd29yZDEyMw==

(Base64 of demo@example.com:password123)

read more about Basic Auth

Response Format

Success Response (200 OK)

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Response Properties:

Using the Token

After running this request successfully, other requests in the collection can reference the token using:

Authorization: Bearer {{token}}

Error Response (401 Unauthorized)

Returned when:

Error Response (403 Forbidden)

Returned when user is authenticated but lacks sufficient permissions to generate a token.

Error Response (500 Internal Server Error)

Millow server errors