Xsolla-logoXsolla Developers
前往发布商帐户

获取用户拥有的游戏列表Client-side

get/v2/project/{project_id}/entitlement

获取用户拥有的游戏列表。响应将包含指定用户拥有的一组游戏。

注意:

所有项目对于可以在响应中获得的商品数量均都限制。默认值和最大值是每个响应50项。要逐页获取更多数据,请使用limitoffset字段。
SecurityXsollaLoginUserJWT
Request
path Parameters
project_id
required
integer

项目ID。您可以在您的发布商帐户项目名称旁边找到。

Example: 44056
query Parameters
limit
integer

页面上元素数量的限制。

Example: limit=50
offset
integer

元素编号,从该元素开始生成列表(从0开始数)。

Example: offset=0
sandbox
integer
Default: 0

应返回何种类型的权利。如果该参数设置为1,则仅返回用户在沙盒模式下收到的权限。如果未传递该参数或设置为0,则仅返回用户在实时模式下收到的权利。

additional_fields[]
Array of strings

附加字段列表。如果在请求中发送这些字段,则它们将包含在响应中。可用字段attributes

Responses
200

已成功接收用户拥有的游戏密钥的列表。

401

基本认证未通过或错误。确保您使用了基本认证或正确的凭据。

Request samples
curl -i -X GET \
  'https://store.xsolla.com/api/v2/project/{project_id}/entitlement?limit=50&offset=0&sandbox=0&additional_fields%5B%5D=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'
Response samples
application/json
{
  • "has_more": false,
  • "items": [
    ],
  • "total_items_count": 1
}