Skip to content

Milkloud ​

Milkloud provides authentication and online data services for Milthm. Applications can use OpenID Connect (OIDC) to act on behalf of multiple users. A user can instead create a User Token for a personal script or another trusted tool.

API Base URLs ​

Choose the API base used by the Milkloud service that the user accesses.

ServiceAPI base
Chinahttps://milkloud.milthm.cn/api
Globalhttps://milkloud.milthm.com/api

Append the endpoint paths in this guide to the selected API base.

Choose an Authentication Method ​

Use caseMethodCredential sent to the API
A website, native app, or service used by multiple peopleOIDCAuthorization: Bearer <access_token>
A personal script or trusted private toolUser TokenAuthorization: Basic <credential>

Do not embed a User Token in a public website, distributed app, public repository, log, or support message. Use OIDC when each user must grant access to an application.

HTTP Conventions ​

ParameterLocationRequiredDefaultDescription
Accept-LanguageHeaderNoEnglishA standard language preference such as ja, en;q=0.8. It changes human-readable messages, not the response schema or symbolic code.

Timestamps use RFC 3339 and may include a UTC offset and fractional seconds.

Response Envelope ​

Milkloud API responses use a common JSON envelope:

ts
export interface MilkloudResponse<T> {
    code: string;
    message: string;
    data?: T;
}

A successful response has code and message set to OK. Errors use a non-success HTTP status and a symbolic code. See Errors for recovery guidance.

API Overview ​

See Scopes for each scope's capability, inclusion rules, and support by OIDC and User Tokens.

OperationMethod and pathRequired resource scope
Read a public profileGET /v1/user/:identityNone
Read the current user's profileGET /v1/userFields depend on openid, profile, user, and email
Update the current user's nicknamePATCH /v1/useruser
Read cloud-save metadataGET /v1/game/save/infomilthm:save:read
Request a cloud-save download URLGET /v1/game/savemilthm:save:read
Read the current user's recent scoresGET /v1/user/:username/recentmilthm:event:recent
Read the current user's Reality and best performancesGET /v1/user/:username/rankmilthm:stats:best_performance

See Scopes, Errors, Profile, Cloud Save, and Recent Scores and Rank for request and response details.