API Tokens

Requesting authentication tokens for API access.

Basic Authentication

API tokens for the service account can be obtained through BasicAuth flow. This flow requires the knowledge of the service account email and password which can be exchanged for a bearer token and access token set. The following API route will return a token set with the access defined in the previous section.

Basic Sign In

post

Returns the refresh and jwt tokens for the user.

Body

Basic Auth Sign In Model

emailstring · emailRequired
passwordstringRequired
Responses
200
Successful Response
application/json
post
POST /users/basic/sign_in HTTP/1.1
Host: auth.logsail.com
Content-Type: application/json
Accept: */*
Content-Length: 44

{
  "email": "[email protected]",
  "password": "text"
}
{
  "access_token": "text",
  "token_type": "Bearer",
  "expires_in": 1,
  "refresh_token": "text"
}

Within a successful response the client will have access to a refresh_token and access_token. Access tokens have an expiry time of 5 minutes and are used for all LogSail APIs. A refresh token expires in 24 hours and is rotated upon upon each refresh of an access token. The following API endpoint will rotate the token set expiring the previous token set minted.

Refresh Tokens

post

Mints a new access and refresh token.

Header parameters
refresh-tokenstringOptionalPattern: ^(agents-|users-)[A-Za-z0-9-_]{128}$
Responses
200
Successful Response
application/json
Responseany
post
POST /refresh/token HTTP/1.1
Host: auth.logsail.com
Accept: */*

No content

Revoking API tokens can be done using the following API endpoint.

Revoke Refresh Token

post

Expires the refresh token.

Header parameters
refresh-tokenstringOptionalPattern: ^(agents-|users-)[A-Za-z0-9-_]{128}$
Responses
200
Successful Response
application/json
Responseany
post
POST /refresh/revoke HTTP/1.1
Host: auth.logsail.com
Accept: */*

No content

Last updated