> For the complete documentation index, see [llms.txt](https://developers.alephee.com/v2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.alephee.com/v2/accounts/get-methods/login-token/request.md).

# Request and Response

## Obtain a login token for auto-login users in various Alephee modules

<mark style="color:blue;">`GET`</mark> `https://api.alephcrm.com/v2/accounts/{accountId}/logintoken`

#### Query Parameters

| Name                                       | Type    | Description           |
| ------------------------------------------ | ------- | --------------------- |
| API\_KEY<mark style="color:red;">\*</mark> | String  | (default=none)        |
| accountId                                  | Integer | (default=none)        |
| userEmail                                  | String  | (default=NULL)        |
| module                                     | Integer | (default=Alephee B2B) |
| ttl                                        | Integer | (default=30)          |

{% tabs %}
{% tab title="200: OK LoginResposeType" %}

{% endtab %}

{% tab title="400: Bad Request {"Status": integer, "Message": string}" %}

{% endtab %}

{% tab title="401: Unauthorized {"Status": integer, "Message": string}" %}

{% endtab %}

{% tab title="403: Forbidden {"Status": integer, "Message": string}" %}

{% endtab %}

{% tab title="404: Not Found {"Status": integer, "Message": string}" %}

{% endtab %}

{% tab title="412: Precondition Failed {"Status": integer, "Message": string}" %}

{% endtab %}

{% tab title="429: Too Many Requests {"Status": integer, "Message": string}" %}

{% endtab %}

{% tab title="500: Internal Server Error string" %}

{% endtab %}
{% endtabs %}

## Parameters details

### API\_KEY

The API\_KEY that was provided.

### accountId

The Alephee account ID of the marketplaces you are trying to get.

### userEmail

The email address of the user that belongs to an existing user for whom a login token needs to be created.\
The email address has the standard format of any email address: <xxxxx@yyyy.zzz>\
The email address belongs to a user. The user must exist in Alephee and be associated with the account ID given in the “accountId” parameter.\
Failure to comply with these requirements will result in an authentication failure.

### Module

The Alephee module for which a token needs to be generated.\
Available values are:\
1 = Alephee B2B portal (for Alephee B2B portal)\
2 = WebAPI (for this API. Some endpoints needs a validation token)

### ttl

Time to Live (TTL) refers to the amount of time in seconds that the generated token is valid.\
After that number of seconds, the generated token will be invalid and useless.\
Valid values are from 5 seconds to 60 seconds. The default value is 30 seconds.
