OpenMLBB SDK Docs

OpenMLBB Endpoint

SDK call mapping, request requirements, and Python example.

Every card documents the SDK call from OpenMLBB and mirrors API path/query/body requirements.

GET User Privacy Settings

/openmlbb/user/privacy/settings

Open Only This

API Path: /api/user/privacy/settings

Retrieve the authenticated player's privacy settings using a valid JWT. Supports query parameter for localization (lang). Requires an Authorization header with the JWT from login.

Headers:

  • Authorization: Bearer <jwt> (JWT obtained during login).

Query parameters:

  • lang: Language code for localized content (default: en).

The response includes:

  • popup_shown: Whether the privacy popup has been shown to the user.
  • privacy: Current privacy state (true/false).

This endpoint requires JWT. Pass the token via the SDK call argument jwt="YOUR_JWT".

Python Example

from OpenMLBB import OpenMLBB

client = OpenMLBB()
response = client.user.privacy_settings(jwt="YOUR_JWT", lang="en")
print(response)

Path and Query Parameters

Name In Type Required Default
lang query string no en

POST Update User Privacy Settings

/openmlbb/user/privacy/settings

Open Only This

API Path: /api/user/privacy/settings

Update the authenticated player's privacy settings using a valid JWT. Supports query parameter for localization (lang). Requires an Authorization header with the JWT from login.

Headers:

  • Authorization: Bearer <jwt> (JWT obtained during login).

Query parameters:

  • visibility: Visibility mode. Use visible to allow friends to view your profile, and invisible to hide your profile from friends. This parameter is required.
  • lang: Language code for localized content (default: en).

This endpoint requires JWT. Pass the token via the SDK call argument jwt="YOUR_JWT".

Python Example

from OpenMLBB import OpenMLBB

client = OpenMLBB()
response = client.user.update_privacy_settings(jwt="YOUR_JWT", body={...}, visibility="visible", lang="en")
print(response)

Path and Query Parameters

Name In Type Required Default
visibility query string yes -
lang query string no en