Skip to main content

Users

These are the docs for the user endpoints. Used for getting info about users.

Check if a user exists

Checs if a user with the specified username exists.

GET /api/v2/user/:username/exists

Returns the status 200 OK if the user exists.

Get a user

Returns a single user.

GET /api/v2/user/:username
Response
{
"username": "CodeMyst",
"contributor": true,
"_id": "bcfu7961",
"avatarUrl": "https://paste.myst.rs/static/assets/avatars/m6jqcf0e.png",
"publicProfile": true,
"defaultLang": "D",
"supporterLength": 0
}

Get the current user

Returns the currently logged in user as identified by the token.

GET /api/v2/user/self
Required scope

user:read

Response
{
"username": "CodeMyst",
"contributor": true,
"_id": "bcfu7961",
"avatarUrl": "https://paste.myst.rs/static/assets/avatars/m6jqcf0e.png",
"publicProfile": true,
"defaultLang": "D",
"supporterLength": 0,
"stars": ["hbygfhts"],
"serviceIds": {
"github": "111111111"
}
}

Get the current user's pastes

Returns the currently logged in user's pastes.

GET /api/v2/user/self/pastes
Required scope

paste:read

Response
[
"xexhemlu",
"sr7zm4hp",
"jhiro31p",
"7lp5gze9",
"cw09wh9y"
]