Omniplex Docs

Linked Roles

Discord linked roles backed by Omniplex badges

Get Linked Roles

GET
/linked-roles

Returns whether Discord linked roles are enabled, the application to authorize, and the badges servers can require.

Response Body

Success

application/json
  1. response
badges?array<>

The badges Discord servers can use as linked-role requirements

client_id?string

The Discord application to authorize

enabled?boolean

Whether linked roles are configured

Example Request
curl -X GET 'https://spider.omniplex.gg/linked-roles'
Example Response
{  "badges": [    {      "description": "string",      "id": "string",      "name": "string"    }  ],  "client_id": "string",  "enabled": true}

Connect Linked Roles

POST
/linked-roles/connect

Exchanges a Discord OAuth2 code (scopes identify and role_connections.write) and sets the user's Omniplex role connection from their linked-role badges. The redirect URI must be /linked-roles/callback on an allowed frontend.

Request Body

application/json
  1. body
code?string

The OAuth2 code Discord returned

redirect_uri?string

The redirect URI used for the authorization

Response Body

Success

application/json
  1. response
badges?array<>

The names of the linked-role badges this user has

user_id?string

The connected Discord user ID

username?string

The connected Discord username

Example Request
curl -X POST 'https://spider.omniplex.gg/linked-roles/connect' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "badges": [    "string"  ],  "user_id": "string",  "username": "string"}