Method: purchases.subscriptions.get
Kullanıcının abonelik satın alma işleminin geçerli olup olmadığını kontrol eder ve aboneliğin geçerlilik süresini döndürür.
HTTP isteği
GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}
URL, gRPC Kod Dönüştürme söz dizimini kullanır.
Yol parametreleri
Parametreler |
packageName |
string
Bu aboneliğin satın alındığı uygulamanın paket adı (ör. "com.bir.şey").
|
subscriptionId |
string
Satın alınan abonelik kimliği (ör. "monthly001").
|
token |
string
Abonelik satın alındığında kullanıcının cihazına sağlanan jeton.
|
İstek içeriği
İstek metni boş olmalıdır.
Yanıt metni
Başarılıysa yanıt metni, SubscriptionPurchase
öğesinin bir örneğini içerir.
Yetkilendirme kapsamları
Aşağıdaki OAuth kapsamını gerektirir:
https://www.googleapis.com/auth/androidpublisher
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2024-12-18 UTC.
[null,null,["Son güncelleme tarihi: 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"]]