Skip to main content

Create a new API token

POST 

https://api.aleph-alpha.com/users/me/tokens

Create a new token to authenticate against the API with (the actual API token is only returned when calling this endpoint)

Request

Bodyrequired

    descriptionstringrequired

    a simple description to remember the token by

    Example: token used on my laptop

Responses

OK

Schema
    metadata objectrequired
    descriptionstringrequired

    the description you provided

    token_idnumberrequired

    the ID of the API token

    tokenstringrequired

    the API token that can be used in the Authorization header

Authorization: http

name: tokentype: httpscheme: bearerdescription: Can be generated in your [Aleph Alpha profile](https://app.aleph-alpha.com/profile)
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://docs.aleph-alpha.com/users/me/tokens");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent(string.Empty);
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://api.aleph-alpha.com
Auth
Body required
{
  "description": "token used on my laptop"
}
ResponseClear

Click the Send API Request button above and see the response here!