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
Content-Type
application/json
Authorization
<key>
Body
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
}{
"error": {
"code": 400,
"message": "Could not create a new link"
},
"catchError": "string"
}If authorization header not provided:
{
"error": {
"code": 403
"message": "Please specify an authorization key!"
}
}If invalid authorization key:
{
"error": {
"code": 403,
"message": "Invalid authorization Key!"
}
}Use Link
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
Content-Type
application/json
Authorization
<key>
Request
Auth Code
number
This is the auto code needed to link accounts
User Id
UUIDv4
This is the database user id
Response
If authorization header not provided:
If invalid authorization key:
Get Link Data From Discord Id
GET /link/discordId/[ Discord Id ]
This will return link data from a users discord id.
Headers
Content-Type
application/json
Authorization
<key>
Response
If could find link discord id:
If could not find link discord id:
If authorization header not provided:
If invalid authorization key:
Get Link Data From Auth Code
GET /link/get/[ Auth Code ]
This will return link data from a users discord id.
Headers
Content-Type
application/json
Authorization
<key>
Request
Auth Code
number
This is the code for linking accounts
Response
If could find link auth code:
If could not find link auth code:
If authorization header not provided:
If invalid authorization key:
Get Expiry Length
GET /link/expireLength
This will return the length of the expiry time
Headers
Content-Type
application/json
Response
If could find link auth code:
If authorization header not provided:
If invalid authorization key:
Is Discord Id Linked
GET /link/exist/[ Discord Id ]
This will return if the useres discord id linked or not
Headers
Content-Type
application/json
Authorization
<key>
Request
Discord Id
string
This is the users discord id
Response
If authorization header not provided:
If invalid authorization key:
Does Auth Code Exist
GET /link/authCode/exists/[ Auth Code ]
This will return if an auth code exists or not
Headers
Content-Type
application/json
Request
Auth Code
number
This is the code for linking accounts
Response
Last updated