Method: purchases.subscriptions.get
ユーザーの定期購入が有効かどうかを確認し、有効期限を返します。
HTTP リクエスト
GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
packageName |
string
この定期購入が購入されたアプリのパッケージ名(例: 「com.some.thing」)。
|
subscriptionId |
string
購入した定期購入の ID(例: 「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"]]