#
Avatar / profile picture API
On this page you'll find detailed information how to manipulate and retrieve avatar (a.k.a profile picture) using our public API.
Authentication
All requests sent to our User and Profile API (including the one you're viewing documentation of at this moment) must pass the authentication. Learn more
#
Technical details:
{INSTANCE_URL}
is URL of current instance without slash at the end and protocol. e.g. creators-hub-instance.com{USER_ID}
is ID of an user you want to fetch/modify avatar from/for. e.g. 6
#
Get user's current avatar URL
GET https://{INSTANCE_URL}/api/public/user/{USER_ID}/profile/avatar
{
"avatarUrl": "https://creatorshub.s3.eu-central-1.amazonaws.com/1677061054831/userAvatars/6/avatar.jpg"
}
#
Update user's current avatar with form data
To modify other user's avatar:
PUT https://{INSTANCE_URL}/api/public/user/{USER_ID}/profile/updateAvatarFile
To modify your avatar:
PUT https://{INSTANCE_URL}/api/public/user/me/profile/updateAvatarFile
Note bout the fields
Avatar field should be named avatar
--
Content-Disposition: form-data; name="avatar"; filename="andrew_ryan.webp"
Content-Type: image/webp
[DATA]
----
Providing avatar format and URL
Unlike for other endpoints, for this one the avatar file does not have to be image/jpeg
type 🚀
{
"avatarUrl": "https://creatorshub.s3.eu-central-1.amazonaws.com/1677074922600/userAvatars/6/avatar.jpg"
}
#
Update user's current avatar with URL
To modify other user's avatar:
PUT https://{INSTANCE_URL}/api/public/user/{USER_ID}/profile/avatar
To modify your avatar:
PUT https://{INSTANCE_URL}/api/public/user/me/profile/avatar
{
"avatarUrl": "https://via.placeholder.com/150"
}
Providing avatar format and URL
Currently the best image format we support is jpeg
. It is recommended for file to be easily convertible to following format since it is hard to detect true type of it programatically.
{
"avatarUrl": "https://creatorshub.s3.eu-central-1.amazonaws.com/1677074922600/userAvatars/6/avatar.jpg"
}
#
Update user's current avatar with binary data
To modify other user's avatar:
PUT https://{INSTANCE_URL}/api/public/user/{USER_ID}/profile/updateAvatarBytes
To modify your avatar:
PUT https://{INSTANCE_URL}/api/public/user/me/profile/updateAvatarBytes
<raw source of image>
Providing avatar format and URL
Currently the best image format we support is jpeg
. It is recommended for file to be easily convertible to following format since it is hard to detect true type of it programatically.
{
"avatarUrl": "https://creatorshub.s3.eu-central-1.amazonaws.com/1677074922600/userAvatars/6/avatar.jpg"
}