Get user

GET /v1/client/user

Returns information and identifier of the requesting user

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
      • app_id integer Required
      • uid string Required
      • user_id integer(int64) Required
      • username string
      • email string(email)
      • terms_of_service_version integer
      • privacy_policy_version integer
      • custom_fields array[object] Required
        Hide custom_fields attributes Show custom_fields attributes object
        • id string Required
        • value string Required
      • offerwall_code string
      • country string Required

        The country code of the user's location.

      • is_spin_available boolean Required

        Whether the user can spin the wheel

      • spin_details object

        Details about the spin wheel for the user

        Hide spin_details attributes Show spin_details attributes object
        • periodicity string Required

          How often the user can spin

          Values are DAILY or WEEKLY.

        • timezone string Required

          The timezone for the spin wheel periods

        • min_level integer Required

          Minimum user level required to spin

        • prize_pool array[object] Required

          Available rewards

          A reward available in the spin wheel

          Hide prize_pool attributes Show prize_pool attributes object
          • type string Required

            The type of reward

            Values are reward-user-currency, reward-user-xp, or no-reward.

          • weight number(float) Required

            The weight of the reward; between 0 and 1

          • prize_data object Required

            One of:
  • 406 application/json

    VPN detected

    Hide response attribute Show response attribute object
    • data object
GET /v1/client/user
curl \
 --request GET 'https://api.bitlabs.ai/v1/client/user' \
 --header "X-Api-Token: $API_KEY" \
 --header "X-User-Id: $API_KEY"
Response examples (200)
{
  "data": {
    "app_id": 42,
    "uid": "string",
    "user_id": 42,
    "username": "string",
    "email": "hello@example.com",
    "consent_general": "2022-01-01T12:00:00Z",
    "consent_analytics": "2022-01-01T12:00:00Z",
    "consent_advertising": "2022-01-01T12:00:00Z",
    "terms_of_service_version": 42,
    "privacy_policy_version": 42,
    "custom_fields": [
      {
        "id": "string",
        "value": "string"
      }
    ],
    "offerwall_code": "string",
    "country": "US, GB, DE, etc.",
    "is_spin_available": true,
    "spin_details": {
      "periodicity": "DAILY",
      "timezone": "UTC",
      "min_level": 5,
      "prize_pool": [
        {
          "type": "reward-user-currency",
          "weight": 0.3,
          "prize_data": {
            "amount": "string"
          }
        }
      ]
    }
  }
}
Response examples (406)
{
  "error": {
    "details": {
      "msg": "vpn detected",
      "http": "406 Not Acceptable"
    }
  }
}