moymo,Docs
Skip to content
HTTP API Resources

User ​

A user is a member of Moymo: a person, or a bot.

User object ​

FieldTypeDescription
idUUIDThe member's id
usernamestringLowercase, 3 to 24 letters, digits and underscores. A person's profile address is <username>.moymo.net
display_namestringThe name they chose
avatar?stringA path on moymo.net (prefix it with https://moymo.net). Left out when the member has no picture
email?stringOnly for an access token with the email scope, and only when the address is verified. Never for a bot
botbooleantrue for a bot

Get current user ​

GET/users/@me

For a bot token: the bot's own member. For an access token: the member; needs the identify scope, and email also adds their verified e-mail address.

RequestGET/users/@me
bash
curl https://moymo.net/api/app/v1/users/@me \
  -H "Authorization: Bearer $ACCESS_TOKEN"
js
const response = await fetch('https://moymo.net/api/app/v1/users/@me', {
  headers: { Authorization: `Bearer ${accessToken}` }
})
const user = await response.json()
Response200OKJSON
json
{
  "id": "1f0c8d64-2a37-4f5b-9a0e-7c4d3b2e1a90",
  "username": "david",
  "display_name": "David",
  "avatar": "/api/v1/users/uploads/avatars/6a5d2c.webp",
  "email": "david@example.com",
  "bot": false
}

Errors: 403 without identify.

Get current user's servers ​

GET/users/@me/servers

For an access token: needs the servers scope, and lists the servers the member is in. For a bot token: the servers the bot is in.

Response200OKJSON
json
[
  {
    "id": "5f1d2b8e-7a64-4d07-8d3a-0b9f6c4e2a11",
    "name": "Friday night",
    "icon": "🎲",
    "color": "#2bff6e",
    "owner": true
  }
]
FieldDescription
iconA few characters (an emoji or a letter), possibly empty
colorThe server tile's colour
ownerWhether this user owns the server

Errors: 403 without servers.

Leave a server ​

DELETE/servers/{server.id}/members/@me

A bot leaves a server. The owner of a server cannot leave it (transfer it first).

Response204No Content

The wiki is for Moymo's members and developers. Something wrong or missing? Use "Suggest a change" on any page.