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

# CreateEnvironmentLogsToken

`POST /gitpod.v1.EnvironmentService/CreateEnvironmentLogsToken`

Creates an access token for retrieving environment logs.

 Generated tokens are valid for one hour and provide read-only access
 to the environment's logs.

 ### Examples

 - Generate logs token:

   Creates a temporary access token for retrieving environment logs.

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

## Request body

- GitpodV1CreateEnvironmentLogsTokenRequest
  - `environmentId` string, uuid — environment_id specifies the environment for which the logs token should be created. +required

## Response `200`

Success

- GitpodV1CreateEnvironmentLogsTokenResponse
  - `accessToken` string, required — access_token is the token that can be used to access the logs of the environment

## 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)
