DiscordRep API
  • DiscordRep API V3
  • API examples
Powered by GitBook
On this page
  • Reputation
  • Infractions
  • Vote
  • Comment
  • Bio

Was this helpful?

DiscordRep API V3

The official documentation of DiscordRep's API

NextAPI examples

Last updated 4 years ago

Was this helpful?

To get a token, please join our , use the command-api genin #bot-commands

Reputation

GET https://discordrep.com/api/v3/rep/:id

Path Parameters

Name
Type
Description

id

string

User ID to look up

Headers

Name
Type
Description

Authorization

string

API key

{
  "id": "538855659714641960",
  "upvotes": 23,
  "downvotes": 0,
  "xp": 19987,
  "rank": "Diamond",
  "staff": true,
}
{  
   "code": 401,
   "error": "unauthorized"
}
{
   "code": 429,
   "error": "Too Many Requests"
}

Infractions

GET https://discordrep.com/api/v3/infractions/:id

Path Parameters

Name
Type
Description

id

string

User ID to lookup

Headers

Name
Type
Description

Authorization

string

API key

{
  "id": "user_id",
  "type": "WARN", // or "BAN"
  "reason": "Sending IP logger in DM",
  "moderator": "256974278283624451",
  "date": 1587074377175
}
/* CLEAN example */
{
  "id": "user_id",
  "type": "CLEAN"
}
{  
   "code": 401,
   "error": "unauthorized"
}
{
   "code": 429,
   "error": "Too Many Requests"
}

Everything below requires a trust token

How do you get a trust token? Short answer. You simply don't get a trust token. This is only given to trusted users, such as staff or known developers.

Vote

POST https://discordrep.com/api/v3/vote/:action/:voter_id/:voted_id

THIS REQUIRES A SPECIAL TRUST TOKEN

Path Parameters

Name
Type
Description

action

string

Only: "up" for upvote "down" for downvote

voter_id

string

User ID of user voting

voted_id

string

User ID of user being voted

Headers

Name
Type
Description

Authorization

string

API key

{"code": 200, "message": "success"}
{"code": 400, "error": "Bad Request"}
{"code": 401,"error": "unauthorized"}
{"code": 403, "error": "the voter is banned, and cant vote"}
{"code": 404, "error": "user not found"}
{"code": 409, "error": "already downvoted"}
{"code": 409, "error": "already upvoted"}
{"code": 409, "error":"cannot vote for yourself" }
{"code": 429, "error":"Too Many Requests, slow down!" }

Comment

POST https://discordrep.com/api/v3/comment/:commenter_id/:commentee_id

THIS REQUIRES A SPECIAL TRUST TOKEN

Path Parameters

Name
Type
Description

commenter_id

string

User ID of user commenting

commentee_id

string

User ID of user being commented

Headers

Name
Type
Description

Authorization

string

API Key

Request Body

Name
Type
Description

comment

string

The comment

{"code": 200, "message": "success"}
{"code": 400, "error": "comment too short"}
{"code": 401,"error": "unauthorized"}
{"code": 403, "error": "the commenter is banned, and cannot comment"}
{"code": 404, "error": "user not found"}
{"code":409, "error":"cannot comment for yourself" }
{"code": 429, "error":"Too Many Requests, slow down!" }

Bio

POST https://discordrep.com/api/v3/bio/:id

THIS REQUIRES A SPECIAL TRUST TOKEN

Path Parameters

Name
Type
Description

id

string

User ID

Headers

Name
Type
Description

Authorization

string

API Key

Request Body

Name
Type
Description

bio

string

The bio

{"code": 200,"message": "success"}
{"code": 400,"error": "bad request"}
{"code": 401,"error": "unauthorized"}
{"code": 404, "error": "user not logged in"}
{"code": 429, "error":"Too Many Requests, slow down!" }
discord