Skip to main content

tokens

Overview

Nametokens
TypeResource
Idlinode.profile.tokens

Fields

NameDatatypeDescription
idintegerThis token's unique ID, which can be used to revoke it.
createdstringThe date and time this token was created.
expirystringWhen this token will expire. Personal Access Tokens cannot be renewed, so after this time the token will be completely unusable and a new token will need to be generated. Tokens may be created with "null" as their expiry and will never expire unless revoked.
labelstringThis token's label. This is for display purposes only, but can be used to more easily track what you're using each token for.
scopesstringThe scopes this token was created with. These define what parts of the Account the token can be used to access. Many command-line tools, such as the <a target="_top" href="https://github.com/linode/linode-cli">Linode CLI</a>, require tokens with access to *. Tokens with more restrictive scopes are generally more secure.
tokenstringThe token used to access the API. When the token is created, the full token is returned here. Otherwise, only the first 16 characters are returned.

Methods

NameAccessible byRequired ParamsDescription
getPersonalAccessTokenSELECTtokenIdReturns a single Personal Access Token.
getPersonalAccessTokensSELECTReturns a paginated list of Personal Access Tokens currently active for your User.
createPersonalAccessTokenINSERTCreates a Personal Access Token for your User. The raw token will be returned in the response, but will never be returned again afterward so be sure to take note of it. You may create a token with at most the scopes of your current token. The created token will be able to access your Account until the given expiry, or until it is revoked.
deletePersonalAccessTokenDELETEtokenIdRevokes a Personal Access Token. The token will be invalidated immediately, and requests using that token will fail with a 401. It is possible to revoke access to the token making the request to revoke a token, but keep in mind that doing so could lose you access to the api and require you to create a new token through some other means.
_getPersonalAccessTokenEXECtokenIdReturns a single Personal Access Token.
_getPersonalAccessTokensEXECReturns a paginated list of Personal Access Tokens currently active for your User.
updatePersonalAccessTokenEXECtokenIdUpdates a Personal Access Token.