- [HTTP request](https://developers.google.com/android-publisher/deprecated-apis/purchases.subscriptions/get#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/android-publisher/deprecated-apis/purchases.subscriptions/get#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/android-publisher/deprecated-apis/purchases.subscriptions/get#body.request_body)
- [Response body](https://developers.google.com/android-publisher/deprecated-apis/purchases.subscriptions/get#body.response_body)
- [Authorization scopes](https://developers.google.com/android-publisher/deprecated-apis/purchases.subscriptions/get#body.aspect)

> [!WARNING]
> This method is deprecated!

Deprecated: Use purchases.subscriptionsv2.get instead. Checks whether a user's subscription purchase is valid and returns its expiry time.

### HTTP request

`GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptions/{subscriptionId}/tokens/{token}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `packageName` | `string` The package name of the application for which this subscription was purchased (for example, 'com.some.thing'). |
| `subscriptionId` | `string` The purchased subscription ID (for example, 'monthly001'). |
| `token` | `string` The token provided to the user's device when the subscription was purchased. |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains an instance of `https://developers.google.com/android-publisher/api-ref/rest/v3/purchases.subscriptions#SubscriptionPurchase`.

### Sample

The following is a sample request:

```json
curl -X GET \
  'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.example.app/purchases/subscriptions/monthly.premium/tokens/abcdefghijklmnopqrstuvwxyz.0123456789' \
  -H 'Accept: application/json'
```

The following is a sample response:

```json
{
  "kind": "androidpublisher#subscriptionPurchase",
  "startTimeMillis": "1678886400000",
  "expiryTimeMillis": "1710470400000",
  "autoRenewing": true,
  "priceCurrencyCode": "USD",
  "priceAmountMicros": "9990000",
  "introductoryPriceInfo": {
    "introductoryPriceCurrencyCode": "USD",
    "introductoryPriceAmountMicros": "4990000",
    "introductoryPricePeriod": "P1M",
    "introductoryPriceCycles": 1
  },
  "countryCode": "US",
  "developerPayload": "{\"userId\": \"user12345\", \"source\": \"app-promo\"}",
  "paymentState": 1,
  "cancelReason": 0,
  "userCancellationTimeMillis": "1709251200000",
  "cancelSurveyResult": {
    "cancelSurveyReason": 3,
    "userInputCancelReason": null
  },
  "orderId": "GPA.3344-5566-7788-99001",
  "linkedPurchaseToken": null,
  "purchaseType": 0,
  "priceChange": null,
  "profileName": "Jane Doe",
  "emailAddress": "jane.doe@example.com",
  "givenName": "Jane",
  "familyName": "Doe",
  "profileId": "109876543210987654321",
  "acknowledgementState": 1,
  "externalAccountId": "user-jane-doe-app-id",
  "promotionType": 1,
  "promotionCode": "WELCOME20",
  "obfuscatedExternalAccountId": "obfUaCcOunTId123",
  "obfuscatedExternalProfileId": "obfPrOfiLeId456",
  "autoResumeTimeMillis": null
}
```

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/androidpublisher`