Users
As the name suggests, contacts are a core part of The Local Universe — the very reason The Local Universe exists is so you can have secure conversations with your contacts. On this page, we'll dive into the different contact endpoints you can use to manage users programmatically. We'll look at how to query, create, update, and delete users.
User Object
Represents a user within The Local Universe.
Properties
- Name
id
- Type
- string
- Description
the user's id
- Name
username
- Type
- string
- Description
the user's username
- Name
email
- Type
- string
- Description
the user's email
- Name
avatar
- Type
- string
- Description
avatar url of the user
- Name
wallpaper
- Type
- string
- Description
wallpaper url of the user
- Name
screen_saver
- Type
- string
- Description
screen saver url of the user
- Name
theme
- Type
- string
- Description
theme url of the user
- Name
bio
- Type
- string
- Description
the user's bio
- Name
status
- Type
- string
- Description
the user's custom status
- Name
dob
- Type
- string
- Description
date of birth of the user
- Name
verified
- Type
- boolean
- Description
whether the email on this account has been verified
- Name
created_at
- Type
- timestamp
- Description
when the user was created
- Name
accent_color
- Type
- integer
- Description
the user's accent color encoded as an integer representation of hexadecimal color code
- Name
premium_type
- Type
- integer
- Description
the type of DELUX subscription on a user's account
- Name
public_flags
- Type
- integer
- Description
public flags of the user
Get Users
ADMIN ONLY
Returns a list of user objects. Requires UsersRead
permission.
Optional attributes
- Name
page
- Type
- integer
- Description
the page of users
- Name
limit
- Type
- integer
- Description
number of users to return
Request
curl -G https://api.localuniverse.io/v1/users \
-H "Authorization: Bearer {token}" \
-d page=1 \
-d limit=10
Response
{
[
{
"id": "1b0fec477b026620",
"username": "tino",
"email": "tino@example.com",
"avatar": "https://cdn.localuniverse.io/...",
"wallpaper": "https://cdn.localuniverse.io/...",
"screen_saver": "https://cdn.localuniverse.io/...",
"theme": "https://cdn.localuniverse.io/...",
"bio": "damn are you by chance looking for an easter egg?",
"status": "go to IOfy8790df08",
"dob": "04-07-00",
"verified": true,
"created_at": 692233200,
"accent_color": 16711680,
"premium_type": 1,
"public_flags": 64,
},
{
"id": "c5027b5717d97178",
// ..
}
]
}
Get Current User
Returns a user object of the requester's account. Requires UsersRead
permission. For OAuth2, this requires theme
identify
scope, which will return the object without an email, and optionally the email
scope, which returns the object with an email.
Request
curl -G https://api.localuniverse.io/v1/users/@me \
-H "Authorization: Bearer {token}"
Response
{
"id": "1b0fec477b026620",
"username": "tino",
"email": "tino@example.com",
"avatar": "https://cdn.localuniverse.io/...",
"wallpaper": "https://cdn.localuniverse.io/...",
"screen_saver": "https://cdn.localuniverse.io/...",
"theme": "https://cdn.localuniverse.io/...",
"bio": "damn are you by chance looking for an easter egg?",
"status": "go to IOfy8790df08",
"dob": "04-07-00",
"verified": true,
"created_at": 692233200,
"accent_color": 16711680,
"premium_type": 1,
"public_flags": 64,
}
Get User
Get a user by ID. Returns a user object. Requires UsersRead
permission.
Request
curl -G https://api.localuniverse.io/v1/users/1b0fec477b026620 \
-H "Authorization: Bearer {token}"
Response
{
"id": "1b0fec477b026620",
"username": "tino",
"email": "tino@example.com",
"avatar": "https://cdn.localuniverse.io/...",
"wallpaper": "https://cdn.localuniverse.io/...",
"screen_saver": "https://cdn.localuniverse.io/...",
"theme": "https://cdn.localuniverse.io/...",
"bio": "damn are you by chance looking for an easter egg?",
"status": "go to IOfy8790df08",
"dob": "04-07-00",
"verified": true,
"created_at": 692233200,
"accent_color": 16711680,
"premium_type": 1,
"public_flags": 64,
}
Modify Current User
Modify the requester's user account settings. Returns a user object on success. Fires a USER_UPDATE
Portal event.
Requires UsersUpdate
permission.
Optional attributes
- Name
username
- Type
- string
- Description
the user's username, can only be changed once every 30 days
- Name
email
- Type
- string
- Description
the user's email, requires re-verification of account
- Name
avatar
- Type
- image data
- Description
modifies the user's avatar
- Name
screen_saver
- Type
- image data
- Description
modifies the user's screen saver
- Name
wallpaper
- Type
- image data
- Description
modifies the user's wallpaper. requires an active DELUX subscription
- Name
theme
- Type
- image data
- Description
modifies the user's theme. requires an active DELUX subscription
- Name
bio
- Type
- string
- Description
the user's bio, max 150 characters
- Name
status
- Type
- string
- Description
the user's custom status, max 50 characters
- Name
accent_color
- Type
- integer
- Description
the user's accent color, encoded as an integer representation of hexadecimal color code
Admin-Only attributes
- Name
verified
- Type
- boolean
- Description
whether the email on this account has been verified
- Name
dob
- Type
- string
- Description
date of birth of the user
- Name
premium_type
- Type
- integer
- Description
the type of DELUX subscription on a user's account
- Name
public_flags
- Type
- integer
- Description
public flags of the user
Request
curl -G https://api.localuniverse.io/v1/users/@me \
-H "Authorization: Bearer {token}" \
-d bio="over the rainbow" \
-d avatar="data:image/jpeg;base64,BASE64_ENCODED_JPEG_IMAGE_DATA" \
Response
{
"id": "1b0fec477b026620",
"username": "tino",
"email": "tino@example.com",
"avatar": "https://cdn.localuniverse.io/...",
"wallpaper": "https://cdn.localuniverse.io/...",
"screen_saver": "https://cdn.localuniverse.io/...",
"theme": "https://cdn.localuniverse.io/...",
"bio": "damn are you by chance looking for an easter egg?",
"status": "go to IOfy8790df08",
"dob": "04-07-00",
"verified": true,
"created_at": 692233200,
"accent_color": 16711680,
"premium_type": 1,
"public_flags": 64,
}
Modify User
ADMIN ONLY
Modify the user's account settings by ID. Returns a user object on success. Fires a USER_UPDATE
Portal event.
Requires UsersUpdate
permission.
Optional attributes
- Name
username
- Type
- string
- Description
the user's username, can only be changed once every 30 days
- Name
email
- Type
- string
- Description
the user's email, requires re-verification of account
- Name
avatar
- Type
- image data
- Description
modifies the user's avatar
- Name
screen_saver
- Type
- image data
- Description
modifies the user's screen saver
- Name
wallpaper
- Type
- image data
- Description
modifies the user's wallpaper. requires an active DELUX subscription
- Name
theme
- Type
- image data
- Description
modifies the user's theme. requires an active DELUX subscription
- Name
bio
- Type
- string
- Description
the user's bio, max 150 characters
- Name
status
- Type
- string
- Description
the user's custom status, max 50 characters
- Name
accent_color
- Type
- integer
- Description
the user's accent color, encoded as an integer representation of hexadecimal color code
Admin-Only attributes
- Name
verified
- Type
- boolean
- Description
whether the email on this account has been verified
- Name
dob
- Type
- string
- Description
date of birth of the user
- Name
premium_type
- Type
- integer
- Description
the type of DELUX subscription on a user's account
- Name
public_flags
- Type
- integer
- Description
public flags of the user
Request
curl -G https://api.localuniverse.io/v1/users/1b0fec477b026620 \
-H "Authorization: Bearer {token}" \
-d bio="over the rainbow" \
-d avatar="data:image/jpeg;base64,BASE64_ENCODED_JPEG_IMAGE_DATA" \
Response
{
"id": "1b0fec477b026620",
"username": "tino",
"email": "tino@example.com",
"avatar": "https://cdn.localuniverse.io/...",
"wallpaper": "https://cdn.localuniverse.io/...",
"screen_saver": "https://cdn.localuniverse.io/...",
"theme": "https://cdn.localuniverse.io/...",
"bio": "damn are you by chance looking for an easter egg?",
"status": "go to IOfy8790df08",
"dob": "04-07-00",
"verified": true,
"created_at": 692233200,
"accent_color": 16711680,
"premium_type": 1,
"public_flags": 64,
}
Delete Current User
Delete the requester's user account by ID. Requires UsersDelete
permission.
Request
curl -G https://api.localuniverse.io/v1/users/1b0fec477b026620 \
-H "Authorization: Bearer {token}"
Response
{
"success"
}
Delete User
ADMIN ONLY
Delete the user's account settings by ID. Requires UsersDelete
permission.
Request
curl -G https://api.localuniverse.io/v1/users/1b0fec477b026620 \
-H "Authorization: Bearer {token}"
Response
{
"success"
}