Skip to content
Ona Docs

CreateRunnerToken

POST/gitpod.v1.RunnerService/CreateRunnerToken

Creates a new authentication token for a runner.

Use this method to:

  • Generate runner credentials
  • Renew expired tokens
  • Set up runner authentication

Note: This does not expire previously issued tokens.

Examples

  • Create token:

    Creates a new token for runner authentication.

    runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
Body ParametersJSONExpand Collapse
runnerId: optional string
formatuuid
ReturnsExpand Collapse
DeprecatedaccessToken: optional string

deprecated, will be removed. Use exchange_token instead.

exchangeToken: optional string

exchange_token is a one-time use token that should be exchanged by the runner for an access token, using the IdentityService.ExchangeToken rpc. The token expires after 24 hours.

CreateRunnerToken

curl https://app.gitpod.io/api/gitpod.v1.RunnerService/CreateRunnerToken \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $GITPOD_API_KEY" \
    -d '{}'
{
  "accessToken": "accessToken",
  "exchangeToken": "exchangeToken"
}
Returns Examples
{
  "accessToken": "accessToken",
  "exchangeToken": "exchangeToken"
}