User
Overview
Base URL: https://api.idosgames.com
HTTP Method: GET / POST
Route: /api/v2/{TitleTemplateId}/{TitleId}/Client/User/{Action}/{UserID}
Documentation: LiveOps Configuration & Logic
Actions (UserAction):
GetClientStateGetUserInventoryGetCustomUserDataUpdateCustomUserDataTransferVirtualCurrencySubtractVirtualCurrencyConsumeItemDeleteUserAccountGetUsageTimeAddUsageTime
Authentication
Required Headers
Authorization: Bearer <SessionTicket>Content-Type: application/json
Unauthorized (401)
Returned when:
Authorizationheader is missingBearer token is missing/invalid
Session validation failed
Response Envelope (Server Standard)
All responses are wrapped with OperationResult<T>:
Success
Failure
SuccessResponse
Used by operations like UpdateCustomUserData and DeleteUserAccount:
Quick Reference (Action Table)
Request body can be
{}for actions without arguments.
Endpoints
1) GetClientState
Returns the full client state for the player. This is the primary bootstrap call — it returns user data, inventory, currencies, configuration, characters, quests, premium state, and more.
Request
Route POST /api/v2/{TitleTemplateId}/{TitleId}/Client/User/GetClientState/{UserID}
Body
Response (OperationResult<ClientStateResponse>)
Implementation note: The exact shape of
ClientStateResponseis produced by the server's internal aggregation logic. It combines multiple data sources into a single payload. Refer to the SDK documentation for the fullClientStateResponseschema.
Common Errors
2) GetUserInventory
Returns the player's current inventory, including items and virtual currency balances.
Request
Route POST /api/v2/{TitleTemplateId}/{TitleId}/Client/User/GetUserInventory/{UserID}
Body
Response (OperationResult<GetUserInventoryResult>)
Note: The exact fields of
GetUserInventoryResultare defined by the SDK'sServerModels. The sample above shows typical fields.
Common Errors
3) GetCustomUserData
Returns the player's custom user data (key-value pairs), excluding internal/system keys.
Request
Route POST /api/v2/{TitleTemplateId}/{TitleId}/Client/User/GetCustomUserData/{UserID}
Body
Response (OperationResult<GetCustomUserDataResult>)
Common Errors
4) UpdateCustomUserData
Updates a single key-value pair in the player's custom user data. System keys (matching SystemCustomUserDataKey enum values) are forbidden.
Request
Route POST /api/v2/{TitleTemplateId}/{TitleId}/Client/User/UpdateCustomUserData/{UserID}
Body
Response (OperationResult<SuccessResponse>)
Common Errors
Missing key or value
System key rejected
Database update failed
5) TransferVirtualCurrency
Transfers an amount of one virtual currency to another. Both currencies must form an allowed pair in AllowedCurrencyTransferPairs from the title configuration. System currencies (Coin, CoinLimit, Token, TokenLimit) are forbidden.
Request
Route POST /api/v2/{TitleTemplateId}/{TitleId}/Client/User/TransferVirtualCurrency/{UserID}
Body
TransferAmountdefaults to1if not provided or ≤ 0.
Response (OperationResult<CurrencyTransferResponse>)
Common Errors
Missing arguments
Missing currency IDs
Same currency
System currency blocked
Amount too small
Config not found
Transfer pairs not configured
Pair not in whitelist
Inventory unavailable
Not enough balance
Transfer operation failed
Post-transfer inventory error
6) SubtractVirtualCurrency
Subtracts (burns) a specified amount of virtual currency from the player's balance.
Request
Route POST /api/v2/{TitleTemplateId}/{TitleId}/Client/User/SubtractVirtualCurrency/{UserID}
Body
Response (OperationResult<CurrencyUpdateResponse>)
Common Errors
Missing arguments
Amount too small
Insufficient balance
Subtraction failed
Note: On unexpected exceptions, this action throws rather than returning a failure envelope. The error will be:
"Error for UserID: {userId}: <exception message>".
7) ConsumeItem
Consumes (reduces uses / removes quantity) of an item from the player's inventory. Supports two modes:
By
ItemInstanceID— targets a specific item instanceBy
ItemID(+ optionalCatalogVersion) — targets items across all instances of that item type
Equipped items cannot be reduced to 0.
Request
Route POST /api/v2/{TitleTemplateId}/{TitleId}/Client/User/ConsumeItem/{UserID}
Body (by ItemInstanceID)
Body (by ItemID)
SubtractAmountdefaults to1if not provided or ≤ 0. IfCatalogVersionis omitted, it defaults to"Item".
Response (OperationResult<ConsumeItemResponse>)
By ItemInstanceID:
By ItemID:
Common Errors
Missing arguments
No identifier provided
Item not found / insufficient / equipped
Consume by ItemID failed
8) DeleteUserAccount
Permanently deletes the player's account and all associated data.
Request
Route POST /api/v2/{TitleTemplateId}/{TitleId}/Client/User/DeleteUserAccount/{UserID}
Body
Response (OperationResult<SuccessResponse>)
Common Errors
9) GetUsageTime
Returns aggregated usage time statistics for the player.
Request
Route POST /api/v2/{TitleTemplateId}/{TitleId}/Client/User/GetUsageTime/{UserID}
Body
Response (OperationResult<UsageTimeStats>)
Common Errors
Note: The error message references "GetUserInventory" — this is a copy-paste artifact in the source code. The actual action is
GetUsageTime.
10) AddUsageTime
Records additional usage time for the player and returns updated statistics.
Request
Route POST /api/v2/{TitleTemplateId}/{TitleId}/Client/User/AddUsageTime/{UserID}
Body
UsageTime— the amount of time to add (defined in the baseIGSRequestclass; typically in minutes or seconds — see server implementation).
Response (OperationResult<UsageTimeStats>)
Common Errors
Models (Contracts)
UserRequest
The shared request DTO for all User actions. Each action reads only the fields it needs.
UserRequestextendsIGSRequest. FieldsItemID,CatalogVersion, andUsageTimeare inherited from the base class.TransferAmountdefaults to1.Valueaccepts any JSON type (string, number, object, etc.).
Key
string
UpdateCustomUserData
Custom data key to update
Value
any
UpdateCustomUserData
Value to set for the key (serialized to string server-side)
CurrencyID
string
SubtractVirtualCurrency
Virtual currency ID to subtract from
SubtractAmount
long
SubtractVirtualCurrency, ConsumeItem
Amount to subtract/consume. Defaults to 1 if ≤ 0 in ConsumeItem
FromCurrencyID
string
TransferVirtualCurrency
Source currency ID
ToCurrencyID
string
TransferVirtualCurrency
Destination currency ID
TransferAmount
long
TransferVirtualCurrency
Amount to transfer (default: 1)
ItemInstanceID
string
ConsumeItem
Specific item instance to consume
ItemID
string
ConsumeItem
Item ID to consume (across all instances)
CatalogVersion
string
ConsumeItem
Catalog version (defaults to "Item" if omitted)
UsageTime
int
AddUsageTime
Usage time value to record
CurrencyTransferResponse
CurrencyUpdateResponse
ConsumeItemResponse
Notes:
When consuming by
ItemInstanceID:ItemIDandCatalogVersionwill benull.When consuming by
ItemID:ItemInstanceIDwill benull.
UsageTimeStats
SuccessResponse
CurrencyTransferPair
Used in TitlePublicConfiguration.AllowedCurrencyTransferPairs to define permitted transfer directions.
Client Flow (Recommended)
A) Bootstrap (App Launch / Login)
GetClientState
This single call returns the complete client state. Use it to populate the main screen, inventory, characters, shop, etc.
B) Refresh Inventory
GetUserInventory
Call after any purchase, consumption, or equipment change to get up-to-date item and currency data.
C) Update Custom Data
UpdateCustomUserData(Key,Value)
For saving player preferences, tutorial progress, UI state, etc.
D) Transfer Currency
TransferVirtualCurrency(FromCurrencyID,ToCurrencyID,TransferAmount)(optional)
GetUserInventory(refresh balances)
E) Spend Currency
SubtractVirtualCurrency(CurrencyID,SubtractAmount)(optional)
GetUserInventory(refresh balances)
F) Consume Item
ConsumeItem(ItemInstanceIDorItemID+CatalogVersion,SubtractAmount)(optional)
GetUserInventory(refresh inventory)
G) Track Usage Time
AddUsageTime(UsageTime) — call periodically (e.g., every minute)GetUsageTime— call to display stats in profile/settings
H) Delete Account
DeleteUserAccount
⚠️ This action is irreversible. Show a confirmation dialog before calling.
Config Usage Guide (Client)
Currency Transfer Whitelist
Before showing a currency transfer UI, the client should check AllowedCurrencyTransferPairs from the title configuration (returned in GetClientState). Only pairs explicitly listed are permitted. The direction matters: a pair {From: "A", To: "B"} does not imply {From: "B", To: "A"} is allowed.
System Currency IDs
The following currencies are system-reserved and cannot be used in TransferVirtualCurrency:
Coin ID (soft currency)
CoinLimit ID
Token ID (hard currency)
TokenLimit ID
The exact IDs are defined by DefaultData on the server. If a transfer is attempted with any of these, the server returns "Forbidden currency id".
Custom User Data Keys
The client can store arbitrary key-value pairs via UpdateCustomUserData, with one restriction: keys that match any value in the SystemCustomUserDataKey enum are reserved by the system and will be rejected with "Incorrect key (system key)".
Examples (cURL)
GetClientState
GetUserInventory
GetCustomUserData
UpdateCustomUserData
TransferVirtualCurrency
SubtractVirtualCurrency
ConsumeItem (by ItemInstanceID)
ConsumeItem (by ItemID)
DeleteUserAccount
GetUsageTime
AddUsageTime
Last updated