A P I Tokens
These API endpoints are related to API Tokens on IBL
{target_type}/{target_id}/sessionsGet Sessions
Gets all session tokens of an entity
Authorization
User-Auth<token>
Requires a user token. Should be prefixed with User in Authorization header.
In: header
Bot-Auth<token>
Requires a bot token. Should be prefixed with Bot in Authorization header.
In: header
Server-Auth<token>
Requires a server API session token. Should be prefixed with Server in Authorization header.
In: header
Team-Auth<token>
Requires a team API session token. Should be prefixed with Team in Authorization header.
In: header
Path Parameters
target_typeRequiredstring
The entity type to use
target_idRequiredstring
The target ID to use
Success
{target_type}/{target_id}/sessionsCreate Session
Creates a new session returning the session token. The session token cannot be read after creation.
Authorization
User-Auth<token>
Requires a user token. Should be prefixed with User in Authorization header.
In: header
Bot-Auth<token>
Requires a bot token. Should be prefixed with Bot in Authorization header.
In: header
Server-Auth<token>
Requires a server API session token. Should be prefixed with Server in Authorization header.
In: header
Team-Auth<token>
Requires a team API session token. Should be prefixed with Team in Authorization header.
In: header
Request Body
application/jsonRequiredexpiryinteger
The time in seconds the session will last
"int64"namestring
The name of the session
perm_limitsarray<string>
The permissions the session will have
typestring
The type of session token. Must be 'api'. Login sessions cannot be created using the Create Session API for obvious reasons
"api"Path Parameters
target_typeRequiredstring
The entity type to use
target_idRequiredstring
The target ID to use
Success
{target_type}/{target_id}/sessions/{session_id}Revoke Session
Revokes a session of an entity based on session ID
Authorization
User-Auth<token>
Requires a user token. Should be prefixed with User in Authorization header.
In: header
Bot-Auth<token>
Requires a bot token. Should be prefixed with Bot in Authorization header.
In: header
Server-Auth<token>
Requires a server API session token. Should be prefixed with Server in Authorization header.
In: header
Team-Auth<token>
Requires a team API session token. Should be prefixed with Team in Authorization header.
In: header
Path Parameters
target_typeRequiredstring
The entity type to use
target_idRequiredstring
The target ID to use
session_idRequiredstring
The session ID to revoke
Success
auth/login/discord-oauth2Get Oauth2 URL
Gets the oauth2 url to redirect to. Primarily for externally managed clients (like iblcli)
Success
auth/login/discord-oauth2Create OAuth2 Login
Takes in a code query parameter and returns a user token. Cannot be used outside of the site for security reasons but documented in case we wish to allow its use in the future.
Request Body
application/jsonRequiredclient_idstring
codestring
protocolstring
Should be 'persepolis'. This is to identify and block older clients that don't support newer protocols
redirect_uristring
scopestring
"normal" | "ban_exempt" | "external_auth"Success
auth/testTest Auth
Test your authentication
Request Body
application/jsonRequiredauth_typestring
target_idstring
tokenstring
Success