v18

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-014211,6201.8 MB
gitpod.v1.EnvironmentService

CreatePortAccessToken

Creates an access token for a specific port on an environment.

The token grants access to the specified port based on the port's admission level. Tokens are short-lived (~1 hour) with refresh tokens for long-running connections.

Examples

  • Generate port access token:

    Creates a token for accessing port 8080 on an environment.

    environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
    port: 8080
    
post/gitpod.v1.EnvironmentService/CreatePortAccessToken

Request body

environmentIdstring uuid

environment_id specifies the environment for which the port access token should be created.

+required

portinteger

port specifies the port number for which the access token should be created.

+required

Response

Success

accessTokenstring required

access_token is the token that can be used to access the port.