Method: inappproducts.insert
สร้างไอเทมที่ซื้อในแอป (ผลิตภัณฑ์ที่มีการจัดการหรือการสมัครใช้บริการ)
คุณไม่ควรใช้วิธีการนี้เพื่อสร้างการสมัครใช้บริการอีกต่อไป ดูข้อมูลเพิ่มเติมได้ที่บทความนี้
คำขอ HTTP
POST https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/inappproducts
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
packageName |
string
ชื่อแพ็กเกจของแอป
|
พารามิเตอร์การค้นหา
พารามิเตอร์ |
autoConvertMissingPrices |
boolean
หากเป็น "จริง" ระบบจะแปลงราคาสำหรับภูมิภาคทั้งหมดที่แอปหลักกำหนดเป้าหมายไว้ซึ่งไม่ได้ระบุราคาสำหรับไอเทมที่ซื้อในแอปนี้เป็นสกุลเงินเป้าหมายโดยอัตโนมัติตามราคาเริ่มต้น ค่าเริ่มต้นคือ False
|
เนื้อหาของคำขอ
เนื้อความของคำขอมีอินสแตนซ์ของ InAppProduct
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ InAppProduct
ที่สร้างขึ้นใหม่
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/androidpublisher
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-12-17 UTC
[null,null,["อัปเดตล่าสุด 2024-12-17 UTC"],[[["Creates an in-app product, such as a managed product or a subscription, within a specified app."],["This method is deprecated for subscription creation; refer to the provided article for alternative approaches."],["The request utilizes an HTTP POST to a structured URL including the package name and optional query parameters for price conversion."],["Request and response bodies utilize the `InAppProduct` object for data transfer."],["Authorization requires the `https://www.googleapis.com/auth/androidpublisher` scope."]]],["This document details the process of creating an in-app product using the Android Publisher API. A `POST` request is sent to a specific URL containing the app's package name. The request body includes `InAppProduct` data. The request can include a boolean query parameter, `autoConvertMissingPrices`, to manage regional pricing. The response, upon success, returns the newly created `InAppProduct`. Authorization requires the `androidpublisher` OAuth scope. This method is deprecated for subscriptions.\n"]]