Reference: protocol.profile.v1

Services

ProfileService

Harmony’s Profile service manages the profiles of the users. Fields

GetProfile

protocol.profile.v1.GetProfileRequest -> protocol.profile.v1.GetProfileResponse

Gets a user’s profile.


GetProfileRequest

Used in GetProfile endpoint.

Fields

user_id

Type: optional uint64

The id of the user to get.


GetProfileResponse

Used in GetProfile endpoint.

Fields

profile

Type: optional protocol.profile.v1.Profile

The user’s profile


UpdateProfile

protocol.profile.v1.UpdateProfileRequest -> protocol.profile.v1.UpdateProfileResponse

Updates the user’s profile.


UpdateProfileRequest

Used in UpdateProfile endpoint.

Fields

new_user_name

Type: optional string

new name of the user.

new_user_avatar

Type: optional string

new user avatar. The avatar will be removed if the string is empty.

new_user_status

Type: UNHANDLED | TYPE

new status of the user.

new_is_bot

Type: optional bool

new whether the user is a bot or not

Deprecated; see bot service and guest handling in auth.


UpdateProfileResponse

Used in UpdateProfile endpoint.

This item has no fields.


GetAppData

protocol.profile.v1.GetAppDataRequest -> protocol.profile.v1.GetAppDataResponse

Gets app data for a user (this can be used to store user preferences which is synchronized across devices).


GetAppDataRequest

Used in GetAppData endpoint.

Fields

app_id

Type: optional string

the app id.


GetAppDataResponse

Used in GetAppData endpoint.

Fields

app_data

Type: optional bytes

the app data.


SetAppData

protocol.profile.v1.SetAppDataRequest -> protocol.profile.v1.SetAppDataResponse

Sets the app data for a user.


SetAppDataRequest

Used in SetAppData endpoint.

Fields

app_id

Type: optional string

the app id.

app_data

Type: optional bytes

the app data.


SetAppDataResponse

Used in SetAppData endpoint.

This item has no fields.

Standalone Message Types

OverrideTag

A tag for an override. This is used as a standard shorthand for sending a message with an override. If a message starts with before and ends with after, clients should send a message with the override the tag belongs to, stripping the tag indicators.

Fields

before

Type: optional string

The portion of the tag before the messge.

after

Type: optional string

The portion of the tag after the messge.


ProfileOverride

An individual override

Fields

username

Type: optional string

The username for this override

avatar

Type: optional string

The avatar for this override

tags

Type: repeated protocol.profile.v1.OverrideTag

The tags for this override.

user_defined

Type: optional string

a custom reason in case the builtin ones don’t fit

system_plurality

Type: optional protocol.harmonytypes.v1.Empty

plurality, not system as in computer


AppDataOverrides

The message used for the ‘h.overrides’ key of appdata.

Fields

overrides

Type: repeated protocol.profile.v1.ProfileOverride

The list of overrides.


Profile

Data for a single profile, without the user’s ID.

Fields

user_name

Type: optional string

the name of the user.

user_avatar

Type: optional string

the user’s avatar.

user_status

Type: UNHANDLED | TYPE

the status of the user.

is_bot

Type: optional bool

whether the user is a bot or not

account_kind

Type: UNHANDLED | TYPE

what kind of account the user is, e.g. full, guest, bot


ProfileUpdated

Event sent when a user’s profile is updated.

Servers should sent this event only to users that can “see” (eg. they are in the same guild) the user this event was triggered by.

Fields

user_id

Type: optional uint64

User ID of the user that had it’s profile updated.

new_username

Type: optional string

New username for this user.

new_avatar

Type: optional string

New avatar for this user.

new_status

Type: UNHANDLED | TYPE

New status for this user.

new_is_bot

Type: optional bool

New is bot or not for this user. Deprecated, prefer new_account_kind if set.

new_account_kind

Type: UNHANDLED | TYPE

The new account kind for this account


StreamEvent

Describes an emote service event.

Fields

profile_updated

Type: optional protocol.profile.v1.ProfileUpdated

Send the profile updated event.

Enums

UserStatus

The possible statuses a user can have.

USER_STATUS_OFFLINE_UNSPECIFIED

User is offline (not connected to the server).

USER_STATUS_ONLINE

User is online (this is the default value if ommitted).

USER_STATUS_IDLE

User is away.

USER_STATUS_DO_NOT_DISTURB

User does not want to be disturbed.

USER_STATUS_MOBILE

User is on mobile.

USER_STATUS_STREAMING

User is streaming


AccountKind

The possible kinds of an account

ACCOUNT_KIND_FULL_UNSPECIFIED

The account is a full-fledged account controlled by a human

ACCOUNT_KIND_BOT

The account is an account controlled by a bot

ACCOUNT_KIND_GUEST

The account is a guest account controlled by a human