---
title: "CreateEnvironmentAccessToken"
method: POST
path: "/gitpod.v1.EnvironmentService/CreateEnvironmentAccessToken"
tags: ["gitpod.v1.EnvironmentService"]
---

# CreateEnvironmentAccessToken

`POST /gitpod.v1.EnvironmentService/CreateEnvironmentAccessToken`

Creates an access token for the environment.

 Generated tokens are valid for one hour and provide environment-specific access permissions.
 The token is scoped to a specific environment.

 ### Examples

 - Generate environment token:

   Creates a temporary access token for accessing an environment.

   ```yaml
   environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
   ```

## Request body

- GitpodV1CreateEnvironmentAccessTokenRequest
  - `environmentId` string, uuid, required — environment_id specifies the environment for which the access token should be created.

## Response `200`

Success

- GitpodV1CreateEnvironmentAccessTokenResponse
  - `accessToken` string, required — access_token is the token that can be used for environment authentication

## Other responses

- `default` — Error

---

[API](https://skmtc.net/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.net/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/revisions/44d50c2ac284/schema)
