Skip to main content

create access-token


To support non-interactive environments, you can generate access tokens to authenticate against the Spawn API.


spawnctl create access-token --purpose <Purpose>


In this tutorial we create an access token for the purpose of using the spawnctl in a CI environment.

As a prerequisite you should've followed the instructions to install spawnctl

  1. Run the following command to create an access token.

    $ spawnctl create access-token --purpose "CI system Spawn access token"
    Access token generated: <access-token-string>

This access token cannot be retrieved after this command. So make sure you store it somewhere safe to retrieve later.

  1. Future spawnctl commands can use the access token to avoid requiring the interactive flow provided by spawnctl auth.

    spawnctl create data-image -f ./development.yaml --accessToken <access-token-string>