Sign in

The Sign-In process allows users to authenticate securely by transmitting their credentials to the server, which issues temporary tokens. These tokens enable access to secured resources without requiring reauthentication for each request.

The POST /v1/auth/token endpoint provides OAuth 2.0 authentication and supports the following grant type:

  • password_email – Authenticates a user using their email and password.

This endpoint returns an access token that is required for authentication in subsequent API requests.


Authentication Using Password Grant Type

The password_email grant type allows users to authenticate using their email and password.

Request

Headers

NameTypeRequiredDescription
partnerIdint32✅ YesThe partner ID required for authentication. Provided by the Key Account Manager.
grantTypestring✅ YesMust be set to password_email.

Body Parameters

NameTypeRequiredDescription
emailstring✅ YesEmail address of the user.
passwordstring✅ YesPassword associated with the user account.

Example Request Body

{
  "email": "[email protected]",
  "password": "securePassword123"
}

Response (200 OK)

NameTypeDescription
access_tokenstringThe OAuth 2.0 access token used for API authentication.
refresh_tokenstringA token used to obtain a new access token when the current one expires.
expires_inintegerExpiration time (in seconds) of the access token.
token_typestringType of the token, typically Bearer.
user_idstringUnique identifier of the authenticated user.

Example Response Body

{
  "access_token": "eyJhbGciOiJIUzI1NiIsIn...",
  "refresh_token": "dGhpcyBpcyBhIHJlZnJlc2h...",
  "expires_in": 3600,
  "token_type": "Bearer",
  "user_id": "12345"
}

Error Responses

Invalid Credentials

If incorrect credentials are provided, the API returns:

{
  "status": "UNAUTHORIZED",
  "message": "We couldn’t sign you in. Please double-check your email and password and try again.",
  "traceId": "TraceId unavailable",
  "errors": []
}