FansquareAPI reference
Open the app

Meta

Identify the calling key

GET/v1/me

Returns the agency and the metadata of the API key: label, scopes and creator scope. Requires no scope: any valid key can call it, which makes it a good first request.

Required scopeNo scope
Rate limit60 requests per minute
curl 'https://api.fansquare.so/v1/me' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "agency": {
    "id": "kVv7h4Z9iT9WpEDFK7N7",
    "name": "Northside Agency"
  },
  "api_key": {
    "label": "Production server",
    "scopes": [
      "read:orders",
      "read:analytics"
    ],
    "creator_scope": [
      "m81IhLxdhzDGYs54rNp2"
    ]
  }
}

Parameters

Headers

  • Fansquare-Versionstringrequired

    API version to pin. Accepts the mineral name or the release date of a version.

Response

OK, application/json

  • agencyobjectrequired

    The agency that owns the API key.

    • idstringrequired

      Fansquare agency id.

    • namestringrequired

      Name of the agency in Fansquare.

  • api_keyobjectrequired

    The API key used for this request.

    • labelstringrequired

      Label given to the key when it was created.

    • scopesarray of stringsrequired

      Scopes granted to the key, as stored: read:orders, read:*, *…

    • creator_scopearray of strings | nullrequired

      Fansquare ids of the creators the key is restricted to, or null when it sees every creator of the agency, including future ones.

curl 'https://api.fansquare.so/v1/me' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "agency": {
    "id": "kVv7h4Z9iT9WpEDFK7N7",
    "name": "Northside Agency"
  },
  "api_key": {
    "label": "Production server",
    "scopes": [
      "read:orders",
      "read:analytics"
    ],
    "creator_scope": [
      "m81IhLxdhzDGYs54rNp2"
    ]
  }
}