Skip to main content

User

Headers

The following headers need to be sent with any request

NameValue
Content-Typeapplication/json
Cookiesusername & token

Retrieving

GET /user

Retrieving data about the current user

Response

{
"status": "success",
"data": <UserData>
}

UserData example

{
"username": "itenerai",
"displayName": "iTenerai",
"bio": "hi there!",
"pronouns": "she/her",
"picture": "imageLinkHere",
"banner": "imageLinkHere",
"status": "crafting and mining",
"level": 68,
"xp": 420,
"verified": true,
"subscription": "auronita"
}

Inventory

Endpoints for the current user's inventory. Manipulating and retrieving.

Retrieving items

GET /user/getInventory

Retrieves the list of items in the current user's inventory

Response

{
"status": "success",
"data": <InventoryData>
}

InventoryData example

{
"id": "1000users",
"title": "1000 Users Celebration",
"type": 0,
"format": "png",
"equipped": false
},
{
"id": "1000users",
"title": "1000 Users Celebration",
"type": 0,
"format": "png",
"equipped": false
}

Equipping items

POST /user/equipItem

Equips the specified item for the user

Body

Must be sent as FormData

NameTypeDescription
itemIdstringID of the item to be equipped

Unequipping items

POST /user/unequipItem

Unequips the specified item for the user

Body

Must be sent as FormData

NameTypeDescription
itemIdstringID of the item to be unequipped

User interactions

Following

Send a signal to follow, or unfollow if already following, a user

POST /user/follow

Body

Must be sent as FormData

NameTypeDescription
followedstringUsername of the user to follow

Notifications

Getting unread notifications

GET /user/getUnreadNotifications

Retrieves the currently unread notifications for the user

Update notification preference

POST /user/updateNotificationPreference

Toggle post notifications for a followed user

Body

Must be sent as FormData

NameTypeDescription
userstringFollowed user
preferencebitWhether to enable post notifications

Tokens & Authentication

Invalidating a token

Each time a user logs in, a new token is created for their account. You can invalidate the current user's token by value or id.

Body

Must be sent as FormData

NameTypeDescription
?tokenstringToken to be invalidated
?tokenIdintID of the token to be invalidated
note

At least one parameter must be specified