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
| Name | Type | Required | Description |
|---|---|---|---|
partnerId | int32 | ✅ Yes | The partner ID required for authentication. Provided by the Key Account Manager. |
grantType | string | ✅ Yes | Must be set to password_email. |
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
email | string | ✅ Yes | Email address of the user. |
password | string | ✅ Yes | Password associated with the user account. |
Example Request Body
{
"email": "[email protected]",
"password": "securePassword123"
}Response (200 OK)
| Name | Type | Description |
|---|---|---|
access_token | string | The OAuth 2.0 access token used for API authentication. |
refresh_token | string | A token used to obtain a new access token when the current one expires. |
expires_in | integer | Expiration time (in seconds) of the access token. |
token_type | string | Type of the token, typically Bearer. |
user_id | string | Unique 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": []
}Updated about 1 month ago
