Method: inappproducts.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
列出所有应用内商品,包括受管理的商品和订阅。
如果应用包含大量应用内商品,系统可能会对响应进行分页。在这种情况下,系统将设置响应字段 tokenPagination.nextPageToken
,调用方应以 token
请求参数的形式提供该字段的值,以检索下一页。
不应再使用此方法检索订阅。如需了解详情,请参阅这篇文章。
HTTP 请求
GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts
网址采用 gRPC 转码语法。
路径参数
参数 |
packageName |
string
应用的软件包名称。
|
查询参数
参数 |
token |
string
分页令牌。如果为空,列表将从第一个商品开始。
|
startIndex (deprecated) |
integer (uint32 format)
已弃用并忽略。设置 token 参数以检索下一页。
|
maxResults (deprecated) |
integer (uint32 format)
已弃用并忽略。页面大小由服务器决定。
|
响应正文
列出所有应用内商品的响应。
如果成功,响应正文将包含结构如下的数据:
字段 |
kind |
string
此响应的类型(“androidpublisher#inappproductsListResponse”)。
|
inappproduct[] |
object (InAppProduct )
所有应用内商品。
|
tokenPagination |
object (TokenPagination )
分页令牌,用于处理一个页面以上的多个商品。
|
pageInfo (deprecated) |
object (PageInfo )
已弃用且未设置。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/androidpublisher
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eLists all in-app products for an application, including both managed products and subscriptions, with pagination for large datasets.\u003c/p\u003e\n"],["\u003cp\u003eIt is recommended to utilize the \u003ccode\u003etoken\u003c/code\u003e parameter for pagination instead of the deprecated \u003ccode\u003estartIndex\u003c/code\u003e and \u003ccode\u003emaxResults\u003c/code\u003e parameters.\u003c/p\u003e\n"],["\u003cp\u003eThis method should no longer be used to retrieve subscriptions, and developers should refer to the provided article for alternative methods.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/androidpublisher\u003c/code\u003e scope for access.\u003c/p\u003e\n"],["\u003cp\u003eThe response provides details about the in-app products, pagination information, and overall response structure in JSON format.\u003c/p\u003e\n"]]],["This API retrieves a list of in-app products (managed products and subscriptions) via a `GET` request to `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts`. Specify the app's package name in the path. Pagination is handled through the `token` query parameter; if the response includes `tokenPagination.nextPageToken`, use its value to retrieve the next page. The request body must be empty, and authorization requires the `androidpublisher` OAuth scope. Subscriptions should not be retrieved with this method anymore.\n"],null,["# Method: inappproducts.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.InappproductsListResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nLists all in-app products - both managed products and subscriptions.\n\nIf an app has a large number of in-app products, the response may be paginated. In this case the response field `tokenPagination.nextPageToken` will be set and the caller should provide its value as a `token` request parameter to retrieve the next page.\n\nThis method should no longer be used to retrieve subscriptions. See [this article](https://android-developers.googleblog.com/2023/06/changes-to-google-play-developer-api-june-2023.html) for more information.\n\n### HTTP request\n\n`GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|---------------|-----------------------------------|\n| `packageName` | `string` Package name of the app. |\n\n### Query parameters\n\n| Parameters ||\n|-------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `token` | `string` Pagination token. If empty, list starts at the first product. |\n| `startIndex` **(deprecated)** | `integer (`[uint32](https://developers.google.com/discovery/v1/type-format)` format)` Deprecated and ignored. Set the `token` parameter to retrieve the next page. |\n| `maxResults` **(deprecated)** | `integer (`[uint32](https://developers.google.com/discovery/v1/type-format)` format)` Deprecated and ignored. The page size is determined by the server. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse listing all in-app products.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"inappproduct\": [ { object (/android-publisher/api-ref/rest/v3/inappproducts#InAppProduct) } ], \"tokenPagination\": { object (/android-publisher/api-ref/rest/v3/TokenPagination) }, \"pageInfo\": { object (/android-publisher/api-ref/rest/v3/PageInfo) } } ``` |\n\n| Fields ||\n|-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` The kind of this response (\"androidpublisher#inappproductsListResponse\"). |\n| `inappproduct[]` | `object (`[InAppProduct](/android-publisher/api-ref/rest/v3/inappproducts#InAppProduct)`)` All in-app products. |\n| `tokenPagination` | `object (`[TokenPagination](/android-publisher/api-ref/rest/v3/TokenPagination)`)` Pagination token, to handle a number of products that is over one page. |\n| `pageInfo` **(deprecated)** | `object (`[PageInfo](/android-publisher/api-ref/rest/v3/PageInfo)`)` | This item is deprecated! Deprecated and unset. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/androidpublisher`"]]