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):2024-12-17。
[null,null,["最后更新时间 (UTC):2024-12-17。"],[[["Lists all in-app products for an application, including both managed products and subscriptions, with pagination for large datasets."],["It is recommended to utilize the `token` parameter for pagination instead of the deprecated `startIndex` and `maxResults` parameters."],["This method should no longer be used to retrieve subscriptions, and developers should refer to the provided article for alternative methods."],["Requires authorization with the `https://www.googleapis.com/auth/androidpublisher` scope for access."],["The response provides details about the in-app products, pagination information, and overall response structure in JSON format."]]],["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"]]