A P I Tokens
These API endpoints are related to API Tokens on IBL
Gets all session tokens of an entity
User-Auth<token>Requires a user token. Should be prefixed with User in Authorization header.
target_type*stringThe entity type to use
target_id*stringThe target ID to use
Success
application/json- response
sessions?array<>The list of sessions
curl -X GET 'https://spider.omniplex.gg/string/string/sessions'{ "sessions": [ { "created_at": "2019-08-24T14:15:22Z", "current": true, "expiry": "2019-08-24T14:15:22Z", "id": "string", "name": "string", "perm_limits": [ "string" ], "target_id": "string", "target_type": "string", "type": "string" } ]}Creates a new session returning the session token. The session token cannot be read after creation.
User-Auth<token>Requires a user token. Should be prefixed with User in Authorization header.
target_type*stringThe entity type to use
target_id*stringThe target ID to use
application/json- body
expiry?integerThe time in seconds the session will last
int64name?stringThe name of the session
perm_limits?array<>The permissions the session will have
type?"api"The type of session token. Must be 'api'. Login sessions cannot be created using the Create Session API for obvious reasons
"api"Success
application/json- response
session_id?stringThe ID of the session
target_id?stringThe ID of the target
token?stringThe token of the session
curl -X POST 'https://spider.omniplex.gg/string/string/sessions' \ -H 'Content-Type: application/json' \ -d '{}'{ "session_id": "string", "target_id": "string", "token": "string"}Revokes a session of an entity based on session ID
User-Auth<token>Requires a user token. Should be prefixed with User in Authorization header.
target_type*stringThe entity type to use
target_id*stringThe target ID to use
session_id*stringThe session ID to revoke
Success
application/json- response
context?Context of the error. Usually used for validation error contexts
message?stringMessage of the error
curl -X DELETE 'https://spider.omniplex.gg/string/string/sessions/string'{ "context": { "property1": "string", "property2": "string" }, "message": "string"}Gets the oauth2 url to redirect to. Primarily for externally managed clients (like iblcli)
Success
application/json- response
client_id?stringThe client ID
url?stringThe URL to redirect the user to for discord oauth2
curl -X GET 'https://spider.omniplex.gg/auth/login/discord-oauth2'{ "client_id": "string", "url": "string"}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.
application/json- body
client_id?stringcode?stringprotocol?stringShould be 'persepolis'. This is to identify and block older clients that don't support newer protocols
redirect_uri?stringscope?string"normal""ban_exempt""external_auth"Success
application/json- response
session_id?stringThe ID of the session
target_id?stringThe ID of the target
token?stringThe token of the session
curl -X POST 'https://spider.omniplex.gg/auth/login/discord-oauth2' \ -H 'Content-Type: application/json' \ -d '{}'{ "session_id": "string", "target_id": "string", "token": "string"}Ends the session used to make this request, if any, and clears the website's session cookie. Always succeeds.
UserUser-Auth<token>Requires a user token. Should be prefixed with User in Authorization header.
Success
application/json- response
context?Context of the error. Usually used for validation error contexts
message?stringMessage of the error
curl -X POST 'https://spider.omniplex.gg/auth/logout'{ "context": { "property1": "string", "property2": "string" }, "message": "string"}Test your authentication
application/json- body
auth_type?stringtarget_id?stringtoken?stringSuccess
application/json- response
authorized?booleanbanned?booleandata?id?stringtarget_type?stringcurl -X POST 'https://spider.omniplex.gg/auth/test' \ -H 'Content-Type: application/json' \ -d '{}'{ "authorized": true, "banned": true, "data": { "property1": null, "property2": null }, "id": "string", "target_type": "string"}