---
title: "Authorize User"
method: POST
path: "/v1/users/authorize"
tags: ["Users"]
---

# Authorize User

`POST /v1/users/authorize`

Generate an authorization URL to log in a player on the Game Hub.

## Request body

- LoginRequest
  - `player_id` string, required — The unique player ID.
  - `nonce` string — The nonce to authenticate the user.
  - `redirect_path` string — The game hub page to redirect the player to.
  - `player_info` PlayerInfo
    - `attributes` PlayerAttributes
      - `level` integer
      - `platform` 'any' | 'ios' | 'android' | 'other'
      - `marketplace` 'none' | 'app_store' | 'google_play' | 'aghanim' | 'other' | 'one_store' | 'galaxy_store'
      - `device_type` 'Apple' | 'Android' | 'Unknown' | 'Other'
      - `tags` PlayerTag[]
      - `soft_currency_amount` integer
      - `hard_currency_amount` integer
      - `appsflyer_id` string
      - `appsflyer_app_id` string
      - `appsflyer_meta` object
      - `appsflyer_event_params` object
      - `appsflyer_customer_user_id` string
      - `adjust_device_id` object
      - `adjust_adid` string
      - `adjust_app_token` string
      - `adjust_authorization_token` string
      - `adjust_purchase_event_token` string
      - `adjust_callback_params` object
      - `adjust_partner_params` object
      - `singular_device_id` object
      - `singular_app_id` string
      - `devtodev_appid` string
      - `devtodev_apikey` string
      - `devtodev_device_id` DevtodevDeviceId
        - `deviceId` string
        - `devtodevId` integer
        - `userId` string
        - `advertisingId` string
      - `ga4_client_id` string — GA4 web `client_id` from the `_ga` cookie.
      - `ga4firebase_app_instance_id` string — Firebase mobile `app_instance_id` from the SDK.
      - `ga4_user_id` string — Partner-set GA4 cross-device `user_id`; falls back to `User.player_id` when unset.
    - `custom_attributes` object — The player's custom attributes.
    - `name` string — The player's name.
    - `avatar_url` string — The player's avatar URL.

## Response `200`

Successful Response

- LoginResponse
  - `authorization_url` string, uri, required — The URL to authenticate the user on the Game Hub.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/aghanim/apis/aghanim-server-to-server-api.md) · [All operations](https://skmtc.net/aghanim/apis/aghanim-server-to-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aghanim/aghanim-server-to-server-api/versions/f8569ba0d776/schema)
