---
title: "CreateRunnerToken"
method: POST
path: "/gitpod.v1.RunnerService/CreateRunnerToken"
tags: ["gitpod.v1.RunnerService"]
---

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

   ```yaml
   runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
   ```

## Request body

- GitpodV1CreateRunnerTokenRequest
  - `runnerId` string, uuid

## Response `200`

Success

- GitpodV1CreateRunnerTokenResponse
  - `accessToken` string — deprecated, will be removed. Use exchange_token instead.
  - `exchangeToken` 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.

## Other responses

- `default` — Error

## Changes

- **2025-02-21** `3655d5ad0ac3` — 1 info
  - response property `accessToken` deprecated
- **2025-02-18** `cd6a05ae99d2` — 1 warning
  - removed the optional property `detail` from the response with the `default` status

[Change history](https://skmtc.dev/gitpod-io/apis/gitpod-v1/changes/gitpod.v1.RunnerService/CreateRunnerToken/post.md)

---

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