Profile
Personal Access Token View
https://api.linode.com/v4/profile/tokens/{tokenId}
Returns a single Personal Access Token.
Path Parameters
The ID of the token to access.
Request Samples
- Shell
- CLI
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/tokens/123
Response Samples
- 200
- default
{
"token": "abcdefghijklmnop",
"created": "2018-01-01T00:01:01.000Z",
"expiry": "2018-01-01T13:46:32",
"id": 1234,
"label": "linode-cli",
"scopes": "*"
}
Responses
200: The requested token.
The 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.
The date and time this token was created.
When 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.
This token's unique ID, which can be used to revoke it.
This token's label. This is for display purposes only, but can be used to more easily track what you're using each token for.
The 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 Linode CLI, require tokens with access to *
. Tokens with more restrictive scopes are generally more secure.
default: Error
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.
Personal Access Token Update
https://api.linode.com/v4/profile/tokens/{tokenId}
Updates a Personal Access Token.
Path Parameters
The ID of the token to access.
Request Body Schema
This token's label. This is for display purposes only, but can be used to more easily track what you're using each token for.
Request Samples
- Shell
- CLI
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "linode-cli"
}' \
https://api.linode.com/v4/profile/tokens/123
Response Samples
- 200
- default
{
"id": 1234,
"label": "linode-cli",
"created": "2018-01-01T00:01:01.000Z",
"expiry": "2018-01-01T13:46:32",
"scopes": "*",
"token": "abcdefghijklmnop"
}
Responses
200: Token updated successfully.
This token's unique ID, which can be used to revoke it.
This token's label. This is for display purposes only, but can be used to more easily track what you're using each token for.
The date and time this token was created.
When 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.
The 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 Linode CLI, require tokens with access to *
. Tokens with more restrictive scopes are generally more secure.
The 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.
default: Error
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.
Personal Access Token Revoke
https://api.linode.com/v4/profile/tokens/{tokenId}
Revokes 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.
Path Parameters
The ID of the token to access.
Request Samples
- Shell
- CLI
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/profile/tokens/123
Response Samples
- 200
- default
{}
Responses
200: Token revoked successfully.
default: Error
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.