## CreateRunnerToken `runners.create_runner_token(RunnerCreateRunnerTokenParams**kwargs) -> RunnerCreateRunnerTokenResponse` **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" ``` ### Parameters - `runner_id: Optional[str]` ### Returns - `class RunnerCreateRunnerTokenResponse: …` - `access_token: Optional[str]` deprecated, will be removed. Use exchange_token instead. - `exchange_token: Optional[str]` 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. ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) response = client.runners.create_runner_token( runner_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) print(response.access_token) ``` #### Response ```json { "accessToken": "accessToken", "exchangeToken": "exchangeToken" } ```