Aghanim Users API

The Users API from Aghanim — 5 operation(s) for users.

Operations 5

POST /v1/users/authorize Authorize User #
POST /v1/users/authenticate Authenticate User #
GET /v1/users/{user_id} Get User #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/aghanim-users-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

aghanim-users-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Aghanim Server-to-Server Users API
  description: The Aghanim Server-to-Server API is designed for **backend server integrations only**.
  contact:
    name: Aghanim
    email: integration@aghanim.com
  version: 2026.07.14
servers:
- url: https://api.aghanim.com/s2s
  description: Production
tags:
- name: Users
paths:
  /v1/users/authorize:
    post:
      tags:
      - Users
      summary: Authorize User
      description: Generate an authorization URL to log in a player on the Game Hub.
      operationId: authorize_user
      requestBody:
        content:
          application/json:
            schema:
              title: Authorize
              $ref: '#/components/schemas/LoginRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v1/users/authenticate:
    post:
      tags:
      - Users
      summary: Authenticate User
      description: 'Authenticate a user using a one-time token. Game Hub generates and sends this token

        to the game client to process the user''s authentication flow with the game server.


        The token is valid for a single use and expires after a short period.'
      operationId: authenticate_user
      requestBody:
        content:
          application/json:
            schema:
              title: Authenticate
              $ref: '#/components/schemas/AuthenticateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /v1/users/{user_id}:
    get:
      tags:
      - Users
      summary: Get User
      description: Retrieve a user by their ID.
      operationId: get_user
      security:
      - HTTPBearer: []
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User Id
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/users/{user_id}/link_player:
    post:
      tags:
      - Users
      summary: Link Player
      description: Link a player to a user.
      operationId: link_player
      security:
      - HTTPBearer: []
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User Id
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: Link Request
              $ref: '#/components/schemas/LinkPlayerRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/users/{user_id}/unlink_player:
    post:
      tags:
      - Users
      summary: Unlink Player
      description: Unlink a player from a user.
      operationId: unlink_player
      security:
      - HTTPBearer: []
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          title: User Id
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              title: Unlink Request
              $ref: '#/components/schemas/LinkPlayerRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AuthenticateRequest:
      properties:
        token:
          type: string
          title: Token
          description: The token to authenticate the user.
      type: object
      required:
      - token
      title: AuthenticateRequest
    PlayerTag:
      type: string
      enum:
      - tester
      title: PlayerTag
    Marketplace:
      type: string
      enum:
      - none
      - app_store
      - google_play
      - aghanim
      - other
      - one_store
      - galaxy_store
      title: Marketplace
    LinkPlayerRequest:
      properties:
        player_id:
          type: string
          title: Player Id
          description: The unique player ID to link to the user.
      type: object
      required:
      - player_id
      title: LinkPlayerRequest
    LoginRequest:
      properties:
        player_id:
          type: string
          title: Player Id
          description: The unique player ID.
        nonce:
          type: string
          title: Nonce
          description: The nonce to authenticate the user.
        redirect_path:
          type: string
          title: Redirect Path
          description: The game hub page to redirect the player to.
        player_info:
          title: Player Info
          description: The player info object.
          $ref: '#/components/schemas/PlayerInfoV1'
      type: object
      required:
      - player_id
      title: LoginRequest
    DevtodevDeviceId:
      properties:
        deviceId:
          type: string
          title: Deviceid
        devtodevId:
          type: integer
          title: Devtodevid
        userId:
          type: string
          title: Userid
        advertisingId:
          type: string
          title: Advertisingid
      type: object
      title: DevtodevDeviceId
    LoginResponse:
      properties:
        authorization_url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Authorization Url
          description: The URL to authenticate the user on the Game Hub.
      type: object
      required:
      - authorization_url
      title: LoginResponse
    Platform:
      type: string
      enum:
      - any
      - ios
      - android
      - other
      title: Platform
    DeviceType:
      type: string
      enum:
      - Apple
      - Android
      - Unknown
      - Other
      title: DeviceType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    PlayerInfoV1:
      properties:
        name:
          type: string
          title: Name
          description: The player's name.
        avatar_url:
          type: string
          title: Avatar Url
          description: The player's avatar URL.
        attributes:
          title: Attributes
          description: The player's attributes.
          $ref: '#/components/schemas/PlayerAttributes'
        custom_attributes:
          additionalProperties:
            anyOf:
            - type: boolean
            - type: integer
            - type: number
            - type: string
            - items:
                anyOf:
                - type: boolean
                - type: integer
                - type: number
                - type: string
              type: array
          type: object
          title: Custom Attributes
          description: The player's custom attributes.
      type: object
      title: PlayerInfo
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PlayerAttributes:
      properties:
        level:
          type: integer
          title: Level
          default: 0
          posthog: true
        platform:
          $ref: '#/components/schemas/Platform'
        marketplace:
          default: none
          $ref: '#/components/schemas/Marketplace'
        device_type:
          $ref: '#/components/schemas/DeviceType'
        tags:
          items:
            $ref: '#/components/schemas/PlayerTag'
          type: array
        soft_currency_amount:
          type: integer
          title: Soft Currency Amount
          default: 0
        hard_currency_amount:
          type: integer
          title: Hard Currency Amount
          default: 0
        appsflyer_id:
          type: string
          title: Appsflyer Id
        appsflyer_app_id:
          type: string
          title: Appsflyer App Id
        appsflyer_meta:
          type: object
          title: Appsflyer Meta
        appsflyer_event_params:
          type: object
          title: Appsflyer Event Params
        appsflyer_customer_user_id:
          type: string
          title: Appsflyer Customer User Id
        adjust_device_id:
          additionalProperties:
            type: string
          type: object
          title: Adjust Device Id
        adjust_adid:
          type: string
          title: Adjust Adid
        adjust_app_token:
          type: string
          title: Adjust App Token
        adjust_authorization_token:
          type: string
          title: Adjust Authorization Token
        adjust_purchase_event_token:
          type: string
          title: Adjust Purchase Event Token
        adjust_callback_params:
          additionalProperties:
            type: string
          type: object
          title: Adjust Callback Params
        adjust_partner_params:
          additionalProperties:
            type: string
          type: object
          title: Adjust Partner Params
        singular_device_id:
          additionalProperties:
            type: string
          type: object
          title: Singular Device Id
        singular_app_id:
          type: string
          title: Singular App Id
        devtodev_appid:
          type: string
          title: Devtodev Appid
        devtodev_apikey:
          type: string
          title: Devtodev Apikey
        devtodev_device_id:
          $ref: '#/components/schemas/DevtodevDeviceId'
        ga4_client_id:
          type: string
          title: Ga4 Client Id
          description: GA4 web `client_id` from the `_ga` cookie.
        ga4firebase_app_instance_id:
          type: string
          title: Ga4Firebase App Instance Id
          description: Firebase mobile `app_instance_id` from the SDK.
        ga4_user_id:
          type: string
          maxLength: 256
          title: Ga4 User Id
          description: Partner-set GA4 cross-device `user_id`; falls back to `User.player_id` when unset.
      type: object
      title: PlayerAttributes
    UserRead:
      properties:
        id:
          type: string
          title: Id
          description: The unique identifier of the user.
        name:
          type: string
          title: Name
          description: The name of the user.
        avatar_url:
          type: string
          title: Avatar Url
          description: The avatar URL of the user.
        player_id:
          type: string
          title: Player Id
          description: The unique player ID of the user. If the user is not linked to a player, this field will be null.
      type: object
      required:
      - id
      title: UserRead
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      description: Refer to the [Authentication](https://docs.aghanim.com/api-reference/) section for instructions on obtaining an API key and use it as the `Bearer` token.