Method: purchases.subscriptions.get
ตรวจสอบว่าการสมัครใช้บริการของผู้ใช้ถูกต้องหรือไม่และแสดงเวลาหมดอายุ
คำขอ HTTP
GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
packageName |
string
ชื่อแพ็กเกจของแอปพลิเคชันที่ซื้อการสมัครใช้บริการนี้ (เช่น "com.some.thing")
|
subscriptionId |
string
รหัสการสมัครใช้บริการที่ซื้อ (เช่น "monthly001")
|
token |
string
โทเค็นที่ระบุให้กับอุปกรณ์ของผู้ใช้เมื่อซื้อการสมัครใช้บริการ
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีอินสแตนซ์ SubscriptionPurchase
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/androidpublisher
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-12-18 UTC
[null,null,["อัปเดตล่าสุด 2024-12-18 UTC"],[[["Verifies the validity of a user's subscription purchase and provides the expiry time."],["Requires the package name, subscription ID, and purchase token to validate the subscription."],["Uses an HTTP GET request and requires authorization with the `https://www.googleapis.com/auth/androidpublisher` scope."],["Returns a `SubscriptionPurchase` object containing subscription details if the purchase is valid."]]],["The core function validates a user's subscription purchase and provides its expiry time. It uses a `GET` HTTP request to a specific URL, incorporating parameters for `packageName`, `subscriptionId`, and `token`. The request body should be empty. A successful response returns a `SubscriptionPurchase` instance. Authorization requires the `https://www.googleapis.com/auth/androidpublisher` OAuth scope. This process verifies the validity of subscription data using a predefined request structure and security measures.\n"]]