---
title: "AllowPortAccess"
method: POST
path: "/gitpod.v1.EnvironmentService/AllowPortAccess"
tags: ["gitpod.v1.EnvironmentService"]
deprecated: true
---

# AllowPortAccess

`POST /gitpod.v1.EnvironmentService/AllowPortAccess`

> **Deprecated.**

Deprecated: Use local validation with the environment state cache instead.

 Checks if the authenticated caller can access a specific port on an environment.
 This is called by the Runner Proxy to validate access tokens against current state.
 The caller's identity is extracted from the JWT in the request context.

 ### Examples

 - Check port access:

   Verifies if the caller can access port 8080 on an environment.

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

## Request body

- GitpodV1AllowPortAccessRequest
  - `environmentId` string, uuid — environment_id specifies the environment to check access for. +required
  - `port` integer — port specifies the port number to check access for. +required

## Response `200`

Success

- GitpodV1AllowPortAccessResponse
  - `allowed` boolean — allowed indicates whether the caller is permitted to access the port.

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