API Tokens
Terrakube has two kinds of API tokens: user and team. Each token type has a different access level and creation process, which are explained below.
API tokens are only shown once when you create them, and then they are hidden. You have to make a new token if you lose the old one.
User API Tokens
API tokens may belong directly to a user. User tokens inherit permissions from the user they are associated with.
User API tokens can be generated inside the User Settings.
![](https://docs.terrakube.io/~gitbook/image?url=https%3A%2F%2F2194998553-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FR6VsmuTZWhfdwP7uD6e0%252Fuploads%252Fgit-blob-c5ea8ef32d53e5d0fcb95246868344852dc6a807%252Fimage%2520%28164%29.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=e64e42d7&sv=1)
Click the Generate and API token button
![](https://docs.terrakube.io/~gitbook/image?url=https%3A%2F%2F2194998553-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FR6VsmuTZWhfdwP7uD6e0%252Fuploads%252Fgit-blob-927c215022b53c989eeac48ecb1c6c193c6f09b9%252Fimage%2520%28221%29.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=cdc2d3e2&sv=1)
Add some small description to the token and the duration
![](https://docs.terrakube.io/~gitbook/image?url=https%3A%2F%2F2194998553-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FR6VsmuTZWhfdwP7uD6e0%252Fuploads%252Fgit-blob-9cd0c6056351b0c8bb69c7bf05b2a1b7ceac59c9%252Fimage%2520%28234%29.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=437c0b46&sv=1)
The new token will be showed and you can copy it to star calling the Terrakube API using Postman or some other tool.
![](https://docs.terrakube.io/~gitbook/image?url=https%3A%2F%2F2194998553-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FR6VsmuTZWhfdwP7uD6e0%252Fuploads%252Fgit-blob-f9f1807ef21c9b251849e1c782521a5782f116d3%252Fimage%2520%28210%29.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=35451ec9&sv=1)
Team API Tokens
API tokens may belong to a specific team. Team API tokens allow access Terrakube, without being tied to any specific user.
A team token can only be generated if you are member of the specified team.
To manage the API token for a team, go to Settings > Teams > Edit button on the desired team.
![](https://docs.terrakube.io/~gitbook/image?url=https%3A%2F%2F2194998553-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FR6VsmuTZWhfdwP7uD6e0%252Fuploads%252Fgit-blob-898ea893316853a4a07702b63a48d8498a227c17%252Fimage%2520%28345%29.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=95e1c1f9&sv=1)
Click the Create a Team Token button in the Team API Tokens section.
![](https://docs.terrakube.io/~gitbook/image?url=https%3A%2F%2F2194998553-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FR6VsmuTZWhfdwP7uD6e0%252Fuploads%252Fgit-blob-0c7c234f07d7bfc27d275c00d047873643a99e4f%252Fimage%2520%28346%29.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=b78e3684&sv=1)
Add the token description and duration and click the Generate token button
![](https://docs.terrakube.io/~gitbook/image?url=https%3A%2F%2F2194998553-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FR6VsmuTZWhfdwP7uD6e0%252Fuploads%252Fgit-blob-bd52d18c1d92f3c0a767080dfad36dd74fb15cb1%252Fimage%2520%28347%29.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=da811631&sv=1)
The new token will be showed and you can copy it to star calling the Terrakube API using Postman or some other tool.
![](https://docs.terrakube.io/~gitbook/image?url=https%3A%2F%2F2194998553-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FR6VsmuTZWhfdwP7uD6e0%252Fuploads%252Fgit-blob-484c0dff725323705295b0054c3a574ddcd6a1fb%252Fimage%2520%28348%29.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=1d3a9565&sv=1)
Last updated