Zum Inhalt springen
SoulFire LogoSoulFire

Refresh Minecraft account

Diese Anleitung gibt es nur auf Englisch.

POST
/v1/instances/{instance_id}/mc-auth:refresh

Refreshes the authentication tokens for an existing Minecraft account. Used to renew expired access tokens using stored refresh tokens.

For Microsoft accounts, this refreshes the Minecraft token, profile, and player certificates. For offline accounts, returns the account unchanged (offline accounts never expire).

Authorization

headerAuthorizationBearer <JWT>

Preferred API authentication. Use a JWT with the api audience.

Path Parameters

instance_id*string

The UUID of the SoulFire instance context for the refresh operation. Must be a valid UUID string. The instance must exist and the caller must have AUTHENTICATE_MC_ACCOUNT permission for this instance.

Formatuuid

Request Body

application/json
  1. body

Request message for refreshing an existing Minecraft account's authentication tokens. Used to renew expired tokens without requiring the user to re-authenticate.

account*

The existing Minecraft account to refresh. Must include valid account data with refresh tokens. The account type determines which refresh mechanism is used. Offline accounts are returned unchanged (they never expire).

Response Body

Response message containing the refreshed Minecraft account.

application/json
  1. response

Response message containing the refreshed Minecraft account.

account*

The refreshed Minecraft account with updated tokens. Contains new access tokens and updated expiration times. For offline accounts, returns the same account unchanged.

Example Request
curl -X POST 'http://127.0.0.1:38765/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/mc-auth:refresh' \
  -H 'Content-Type: application/json' \
  -d '{
  "account": {
    "type": "MICROSOFT_JAVA_CREDENTIALS",
    "profileId": "faebe71b-2bf8-4bdb-9b67-258e4d6aa00a",
    "lastKnownName": "string"
  }
}'
Example Response
{
  "account": {
    "type": "MICROSOFT_JAVA_CREDENTIALS",
    "profileId": "faebe71b-2bf8-4bdb-9b67-258e4d6aa00a",
    "lastKnownName": "string",
    "onlineChainJavaData": {
      "authChain": {}
    },
    "offlineJavaData": {},
    "bedrockData": {
      "authChain": {}
    },
    "onlineSimpleJavaData": {
      "accessToken": "string",
      "expireTimeMs": "string"
    },
    "theAlteningJavaData": {
      "accountToken": "string",
      "accessToken": "string"
    },
    "config": [
      {
        "namespace": "string",
        "entries": [
          {
            "key": "string",
            "value": null
          }
        ]
      }
    ],
    "persistentMetadata": [
      {
        "namespace": "string",
        "entries": [
          {
            "key": "string",
            "value": null
          }
        ]
      }
    ]
  }
}

War diese Seite hilfreich?