---
title: "Get environment subscription credentials"
method: GET
path: "/environments/subscription-token"
tags: ["environments"]
---

# Get environment subscription credentials

`GET /environments/subscription-token`

Get a token which can be used to subscribe to events for this environment

## Query parameters

- `environmentId` string, required — Environment ID

## Headers

- `Authorization` string, required
- `X-Disable-Hooks` 'true', required

## Response `200`

Response with status 200

- TypeSpacesEventTokenResponse
  - `data` TypeSpacesEventToken, required — Properties used to allow users to connect to the event bus
    - `accountId` string — Account ID
    - `subscribeKey` string — The id of the event bus to subscribe to
    - `ttl` integer — Time to live in minutes
    - `token` string — This should be your API key.

## Other responses

- `400` — Error response with status 400
- `404` — Error response with status 404

---

[API](https://skmtc.net/flatfile/apis/api-reference.md) · [All operations](https://skmtc.net/flatfile/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flatfile/api-reference/revisions/9d3a9979cd96/schema)
