API Tokens
Requesting authentication tokens for API access.
Warning: It is recommended to use a Service Account when accessing the LogSail API. Sharing email and passwords for a user account is not recommended when requesting API tokens for 3rd party 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.
Returns the refresh and jwt tokens for the user.
Basic Auth Sign In Model
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.
Mints a new access and refresh token.
^(agents-|users-)[A-Za-z0-9-_]{128}$
POST /refresh/token HTTP/1.1
Host: auth.logsail.com
Accept: */*
No content
Revoking API tokens can be done using the following API endpoint.
Expires the refresh token.
^(agents-|users-)[A-Za-z0-9-_]{128}$
POST /refresh/revoke HTTP/1.1
Host: auth.logsail.com
Accept: */*
No content
Last updated