endpoint for getting users.

check if a user exists



returns 200 OK if the user exists and 404 NOT FOUND if it doesn't.

get a user



returns the user if found. the user has to have a public profile enabled for it to be fetched through the api.

returned JSON body:

field type description
_id string id of the user
username string username of the user
avatarUrl string url of their avatar image
defaultLang string the default language
publicProfile bool if they have a public profile
supporterLength uint how long has the user been a supporter for, 0 if not a supporter
contributor bool if the user is a contributor to pastemyst

get the current user



returns the current user identified by the token. you have to provide the Authorization header.

this method returns more data than the /user/{username} method.

added fields:

field type description
stars string[] list of paste ids the user has starred
serviceIds object user ids of the service the user used to create an account

example JSON:

    "_id": "gvtfvy9h",
    "avatarUrl": "",
    "contributor": true,
    "defaultLang": "D",
    "publicProfile": true,
    "serviceIds": {
        "github": "1111111"
    "stars": ["cw09wh9y"],
    "supporterLength": 24,
    "username": "CodeMyst"

get the current user's pastes



returns a list of current user's pastes. the current user is identified by a token. you have to provide the Authorization header.

example JSON: