Link Routes

These are the API routes to do with the user links on the project.

Create a new user

POST /link/new

This is the route to create a new link.

Headers

Name
Value

Content-Type

application/json

Authorization

<key>

Body

Name
Type
Description

linkId

UUIDv4

This is the database id for the link

discordUserId

bigint

This is the users discord id

authCode

number

This is the link auth code required for linking to steam account

expiryDate

Date

This is the expiry date where the auth code expires

Response

{
    "created": true
}

POST /link/use/[ Auth Code ]/[ User Id ]

This is a route to link the user id to the users discord id from the auth code

Headers

Name
Value

Content-Type

application/json

Authorization

<key>

Request

Name
Type
Description

Auth Code

number

This is the auto code needed to link accounts

User Id

UUIDv4

This is the database user id

Response

GET /link/discordId/[ Discord Id ]

This will return link data from a users discord id.

Headers

Name
Value

Content-Type

application/json

Authorization

<key>

Response

If could find link discord id:

If could not find link discord id:

GET /link/get/[ Auth Code ]

This will return link data from a users discord id.

Headers

Name
Value

Content-Type

application/json

Authorization

<key>

Request

Name
Value
Description

Auth Code

number

This is the code for linking accounts

Response

If could find link auth code:

If could not find link auth code:

Get Expiry Length

GET /link/expireLength

This will return the length of the expiry time

Headers

Name
Value

Content-Type

application/json

Response

If could find link auth code:

Is Discord Id Linked

GET /link/exist/[ Discord Id ]

This will return if the useres discord id linked or not

Headers

Name
Value

Content-Type

application/json

Authorization

<key>

Request

Name
Value
Description

Discord Id

string

This is the users discord id

Response

Does Auth Code Exist

GET /link/authCode/exists/[ Auth Code ]

This will return if an auth code exists or not

Headers

Name
Value

Content-Type

application/json

Request

Name
Value
Description

Auth Code

number

This is the code for linking accounts

Response

Last updated