Login

POST /api/loginAuth validates a BlueSphere account login token and creates a fresh auth code for the user. Use this as the first request in a client integration.

POST
/api/loginAuth
curl https://prod.bluesphere.live/api/loginAuth \
  -H "Content-Type: application/json" \
  -d '{
    "token": "bs_login_token",
    "consoleId": "console-01",
    "game": "Grand Theft Auto V 1.53"
  }'

Request body

  • Name
    token
    Type
    string
    Description

    BlueSphere login token for the account. The backend trims surrounding whitespace and removes wrapping triple backticks before lookup.

  • Name
    consoleId
    Type
    string
    Description

    Required console identifier supplied by the client.

  • Name
    game
    Type
    string
    Description

    Required game name or game/version string supplied by the client.

Success response

The login endpoint returns HTTP 200 with status: "success" when the token matches a user.

200 success

{
  "status": "success",
  "code": "",
  "authCode": "base64url_signed_auth_code",
  "udpToken": "64_character_hex_udp_token",
  "accountId": 123456,
  "onlineId": "BlueSphereUser"
}
  • Name
    authCode
    Type
    string
    Description

    Short-lived auth code generated by the backend. It expires after 24 hours and is stored as the user's current auth code.

  • Name
    udpToken
    Type
    string
    Description

    Random 32-byte session token encoded as 64 hexadecimal characters.

  • Name
    accountId
    Type
    number
    Description

    Numeric BlueSphere account identifier.

  • Name
    onlineId
    Type
    string
    Description

    Public online username for the account.

Failed responses

The current backend returns HTTP 200 for login validation failures. Check status first, then handle code and error.

200 failed

{
  "status": "failed",
  "code": "INVALID_TOKEN",
  "error": "Invalid login token",
  "authCode": "",
  "udpToken": "",
  "accountId": "",
  "onlineId": ""
}
  • Name
    MISSING_TOKEN
    Type
    code
    Description

    token was empty or missing.

  • Name
    INVALID_PARAMETERS
    Type
    code
    Description

    consoleId or game was empty or missing.

  • Name
    INVALID_TOKEN
    Type
    code
    Description

    No user exists for the provided login token.

  • Name
    SERVER_ERROR
    Type
    code
    Description

    The backend hit an unexpected error while processing login.

Was this page helpful?