- [HTTP request](https://developers.google.com/colab/api/reference/rest/v1beta/TopLevel/getSubscription#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/colab/api/reference/rest/v1beta/TopLevel/getSubscription#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/colab/api/reference/rest/v1beta/TopLevel/getSubscription#body.request_body)
- [Response body](https://developers.google.com/colab/api/reference/rest/v1beta/TopLevel/getSubscription#body.response_body)
  - [JSON representation](https://developers.google.com/colab/api/reference/rest/v1beta/TopLevel/getSubscription#body.Subscription.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/colab/api/reference/rest/v1beta/TopLevel/getSubscription#body.aspect)
- [SubscriptionTier](https://developers.google.com/colab/api/reference/rest/v1beta/TopLevel/getSubscription#SubscriptionTier)
- [Try it!](https://developers.google.com/colab/api/reference/rest/v1beta/TopLevel/getSubscription#try-it)

Gets the subscription of the requesting user.

### HTTP request

`GET https://colaboratory.googleapis.com/v1beta/{name=subscription}`

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

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The name of the subscription to retrieve. The only valid value is "subscription". |

### Request body

The request body must be empty.

### Response body

Colab user subscription information.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "name": string, "tier": enum (`https://developers.google.com/colab/api/reference/rest/v1beta/TopLevel/getSubscription#SubscriptionTier`) } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Name of the subscription. This will always be "subscription". |
| `tier` | ``enum (`https://developers.google.com/colab/api/reference/rest/v1beta/TopLevel/getSubscription#SubscriptionTier`)`` Required. User's Colab subscription tier. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/colaboratory`
- `
  https://www.googleapis.com/auth/colaboratory.readonly`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).

## SubscriptionTier

User's Colab subscription tier.

| Enums ||
|---|---|
| `SUBSCRIPTION_TIER_UNSPECIFIED` | Default value. This value is unused. |
| `SUBSCRIPTION_TIER_FREE` | User is not subscribed to any paid tier. |
| `SUBSCRIPTION_TIER_PRO` | User is subscribed to Colab Pro. |
| `SUBSCRIPTION_TIER_PRO_PLUS` | User is subscribed to Colab Pro+. |