Skip to content

Profile ​

The Profile API exposes a small public profile, scoped information about the authenticated user, and a nickname update. It does not expose account administration or first-party game settings to third-party integrations.

Read the Current User ​

http
GET /v1/user
Accept: application/json
Authorization: Bearer ACCESS_TOKEN

The response data has this public shape:

ts
export interface CurrentUserProfile {
  uid?: string;
  zone?: string;
  username?: string;
  nickname?: string;
  avatar?: string;
  email?: string;
}

Fields are optional and depend on the credential's granted scopes:

FieldsReturned with
uid, zoneAny of openid, profile, or user
username, nickname, avatarEither profile or user
emailemail

Additional fields used by first-party clients are not part of this contract.

Read a Public Profile ​

http
GET /v1/user/:identity
Accept: application/json

This endpoint does not require authentication.

ParameterLocationRequiredDefaultDescription
identityPathYesNoneA URL-encoded username or UID:<uid> as one URL-encoded path segment.

The public response contains only these optional fields:

ts
export interface PublicUserProfile {
  username?: string;
  nickname?: string;
  avatar?: string;
}

An authenticated request for the credential owner's own identity may return the expanded current-user shape according to its scopes. Omit credentials when an integration specifically needs the stable public shape.

Update the Nickname ​

http
PATCH /v1/user
Accept: application/json
Content-Type: application/json
Authorization: Bearer ACCESS_TOKEN

The credential must have the user scope. The read-only profile scope is not sufficient.

ParameterLocationRequiredDefaultDescription
nicknameBodyYesNoneThe new nickname. It must be non-empty.

Example request:

bash
curl \
  --request PATCH \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer ACCESS_TOKEN' \
  --data '{"nickname":"New Nickname"}' \
  'https://milkloud.milthm.com/api/v1/user'

A successful update returns the common envelope without data:

json
{
  "code": "OK",
  "message": "OK"
}

Submitting a nickname change consumes one change opportunity, even if the change does not succeed. One opportunity recovers every 15 days and 12 hours.

This API changes only the nickname.

Errors ​

Authenticated profile requests may return the common authentication errors.

OperationHTTP statusCodeMeaning
Read public or current profile404UserNotFoundErrorThe identity does not exist or the account is no longer available.
Update nickname400RequestParamErrorThe request does not contain a supported non-empty update.
Update nickname409UserNicknameTakenErrorThe requested nickname is unavailable.
Update nickname409StaminaNotEnoughNo nickname change opportunity is available.