Skip to main content

Login with email and password.

POST 

/users/login

This should not be used by most API consumers, who should generate API tokens using the login page and use bearer authentication. This endpoint allows bootstrapping the API via login to generate more API tokens.

Request

Bodyrequired

    emailstringrequired

    the email address

    passwordstringrequired

    the password

Responses

OK

Response Headers
    Set-Cookie
Schema
    idnumberrequired

    User ID

    emailstringrequired

    Email address of the user

    rolestringrequired

    Role of the user

    credits_remainingnumberrequired

    Remaining credits for this user

    invoice_allowedbooleanrequired

    Is this user post-paid?

    out_of_credits_thresholdintegerrequired

    Threshold for out-of-credits notification. If the threshold gets crossed with a task, then we trigger an email.

    terms_of_service_versionstringrequired

    Version string of the terms of service that the user has accepted

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://docs.aleph-alpha.com/users/login");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"email\": \"string\",\n \"password\": \"string\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Body required
{
  "email": "string",
  "password": "string"
}