Profile v4.115.0

Profile View

GET https://api.linode.com/v4/profile

Returns information about the current User. This can be used to see who is acting in applications where more than one token is managed. For example, in third-party OAuth applications.

This endpoint is always accessible, no matter what OAuth scopes the acting token has.

Authorizations

personalAccessToken
oauth

Request Samples

Response Samples

Responses

Profile Update

PUT https://api.linode.com/v4/profile

Update information in your Profile. This endpoint requires the “account:read_write” OAuth Scope.

Authorizations

personalAccessToken
oauthaccount:read_write

Request Body Schema

authorized_keys
Nullable
array of strings

The list of SSH Keys authorized to use Lish for your User. This value is ignored if lish_auth_method is “disabled.”

email
string <email>

Your email address. This address will be used for communication with Linode as necessary.

email_notifications
boolean

If true, you will receive email notifications about account activity. If false, you may still receive business-critical communications through email.

ip_whitelist_enabled
boolean

If true, logins for your User will only be allowed from whitelisted IPs. This setting is currently deprecated, and cannot be enabled.

If you disable this setting, you will not be able to re-enable it.

lish_auth_method
string
Enum: password_keys keys_only disabled

The authentication methods that are allowed when connecting to the Linode Shell (Lish).

  • keys_only is the most secure if you intend to use Lish.
  • disabled is recommended if you do not intend to use Lish at all.
  • If this account’s Cloud Manager authentication type is set to a Third-Party Authentication method, password_keys cannot be used as your Lish authentication method. To view this account’s Cloud Manager authentication_type field, send a request to the View Profile endpoint.

restricted
boolean

If true, your User has restrictions on what can be accessed on your Account. To get details on what entities/actions you can access/perform, see /profile/grants.

timezone
string

The timezone you prefer to see times in. This is not used by the API directly. It is provided for the benefit of clients such as the Linode Cloud Manager and other clients built on the API. All times returned by the API are in UTC.

two_factor_auth
boolean

If true, logins from untrusted computers will require Two Factor Authentication. See /profile/tfa-enable to enable Two Factor Authentication.

Request Samples

Response Samples

Responses

Authorized Apps List

GET https://api.linode.com/v4/profile/apps

This is a collection of OAuth apps that you’ve given access to your Account, and includes the level of access granted.

Authorizations

personalAccessToken
oauthaccount:read_only

Query Parameters

page
Type:
integer >= 1
Default: 1
Default:
1

The page of a collection to return.

page_size
Type:
integer 25..100
Default: 100
Default:
100

The number of items to return per page.

Request Samples

Response Samples

Responses

App Access Revoke

DELETE https://api.linode.com/v4/profile/apps/{appId}

Expires this app token. This token may no longer be used to access your Account.

Authorizations

personalAccessToken
oauthaccount:read_write

Path Parameters

appIdinteger
Required

The authorized app ID to manage.

Request Samples

Response Samples

Responses

Authorized App View

GET https://api.linode.com/v4/profile/apps/{appId}

Returns information about a single app you’ve authorized to access your Account.

Authorizations

personalAccessToken
oauthaccount:read_only

Path Parameters

appIdinteger
Required

The authorized app ID to manage.

Request Samples

Response Samples

Responses

Trusted Devices List

GET https://api.linode.com/v4/profile/devices

Returns a paginated list of active TrustedDevices for your User. Browsers with an active Remember Me Session are logged into your account until the session expires or is revoked.

Authorizations

personalAccessToken
oauthaccount:read_only

Request Samples

Response Samples

Responses

Trusted Device Revoke

DELETE https://api.linode.com/v4/profile/devices/{deviceId}

Revoke an active TrustedDevice for your User. Once a TrustedDevice is revoked, this device will have to log in again before accessing your Linode account.

Authorizations

personalAccessToken
oauthaccount:read_write

Path Parameters

deviceIdinteger
Required

The ID of the TrustedDevice

Request Samples

Response Samples

Responses

Trusted Device View

GET https://api.linode.com/v4/profile/devices/{deviceId}

Returns a single active TrustedDevice for your User.

Authorizations

personalAccessToken
oauthaccount:read_only

Path Parameters

deviceIdinteger
Required

The ID of the TrustedDevice

Request Samples

Response Samples

Responses

Grants List

GET https://api.linode.com/v4/profile/grants

This returns a GrantsResponse describing what the acting User has been granted access to. For unrestricted users, this will return a 204 and no body because unrestricted users have access to everything without grants. This will not return information about entities you do not have access to. This endpoint is useful when writing third-party OAuth applications to see what options you should present to the acting User.

For example, if they do not have global.add_linodes, you might not display a button to deploy a new Linode.

Any client may access this endpoint; no OAuth scopes are required.

Authorizations

personalAccessToken
oauth

Request Samples

Response Samples

Responses

Logins List

GET https://api.linode.com/v4/profile/logins

Returns a collection of successful account logins from this user during the last 90 days.

Authorizations

personalAccessToken
oauthaccount:read_only

Request Samples

Response Samples

Responses

Login View

GET https://api.linode.com/v4/profile/logins/{loginId}

Returns a login object displaying information about a successful account login from this user.

Authorizations

personalAccessToken
oauthaccount:read_only

Path Parameters

loginIdinteger
Required

The ID of the login object to access.

Request Samples

Response Samples

Responses

User Preferences View

GET https://api.linode.com/v4/profile/preferences

View a list of user preferences tied to the OAuth client that generated the token making the request. The user preferences endpoints allow consumers of the API to store arbitrary JSON data, such as a user’s font size preference or preferred display name. User preferences are available for each OAuth client registered to your account, and as such an account can have multiple user preferences.

Authorizations

personalAccessToken
oauthaccount:read_only

Request Samples

Response Samples

Responses

User Preferences Update

PUT https://api.linode.com/v4/profile/preferences

Updates a user’s preferences. These preferences are tied to the OAuth client that generated the token making the request. The user preferences endpoints allow consumers of the API to store arbitrary JSON data, such as a user’s font size preference or preferred display name. An account may have multiple preferences. Preferences, and the pertaining request body, may contain any arbitrary JSON data that the user would like to store.

Authorizations

personalAccessToken
oauthaccount:read_write

Request Body Schema

Arbitrary JSON of your choosing.

Request Samples

Response Samples

Responses

SSH Keys List

GET https://api.linode.com/v4/profile/sshkeys

Returns a collection of SSH Keys you’ve added to your Profile.

Authorizations

personalAccessToken
oauthaccount:read_only

Query Parameters

page
Type:
integer >= 1
Default: 1
Default:
1

The page of a collection to return.

page_size
Type:
integer 25..100
Default: 100
Default:
100

The number of items to return per page.

Request Samples

Response Samples

Responses

SSH Key Add

POST https://api.linode.com/v4/profile/sshkeys

Adds an SSH Key to your Account profile.

Authorizations

personalAccessToken
oauthaccount:read_write

Request Body Schema

label
string 1..64 characters

A label for the key.

ssh_key
string <ssh-key>

The public SSH Key, which is used to authenticate to the root user of the Linodes you deploy.

Request Samples

Response Samples

Responses

SSH Key Delete

DELETE https://api.linode.com/v4/profile/sshkeys/{sshKeyId}

Deletes an SSH Key you have access to.

Note: deleting an SSH Key will not remove it from any Linode or Disk that was deployed with authorized_keys. In those cases, the keys must be manually deleted on the Linode or Disk. This endpoint will only delete the key’s association from your Profile.

Authorizations

personalAccessToken
oauthaccount:read_write

Path Parameters

sshKeyIdinteger
Required

The ID of the SSHKey

Request Samples

Response Samples

Responses

SSH Key View

GET https://api.linode.com/v4/profile/sshkeys/{sshKeyId}

Returns a single SSH Key object identified by id that you have access to view.

Authorizations

personalAccessToken
oauthaccount:read_only

Path Parameters

sshKeyIdinteger
Required

The ID of the SSHKey

Request Samples

Response Samples

Responses

SSH Key Update

PUT https://api.linode.com/v4/profile/sshkeys/{sshKeyId}

Updates an SSH Key that you have permission to read_write.

Authorizations

personalAccessToken
oauthaccount:read_write

Path Parameters

sshKeyIdinteger
Required

The ID of the SSHKey

Request Body Schema

label
string <= 64 characters

A label for the SSH Key.

Request Samples

Response Samples

Responses

Two Factor Authentication Disable

POST https://api.linode.com/v4/profile/tfa-disable

Disables Two Factor Authentication for your User. Once successful, login attempts from untrusted computers will only require a password before being successful. This is less secure, and is discouraged.

Authorizations

personalAccessToken
oauthaccount:read_write

Request Samples

Response Samples

Responses

Two Factor Secret Create

POST https://api.linode.com/v4/profile/tfa-enable

Generates a Two Factor secret for your User. TFA will not be enabled until you have successfully confirmed the code you were given with tfa-enable-confirm (see below). Once enabled, logins from untrusted computers will be required to provide a TFA code before they are successful.

Authorizations

personalAccessToken
oauthaccount:read_write

Request Samples

Response Samples

Responses

Two Factor Authentication Confirm/Enable

POST https://api.linode.com/v4/profile/tfa-enable-confirm

Confirms that you can successfully generate Two Factor codes and enables TFA on your Account. Once this is complete, login attempts from untrusted computers will be required to provide a Two Factor code before they are successful.

Authorizations

personalAccessToken
oauthaccount:read_write

Request Body Schema

tfa_code
string

The Two Factor code you generated with your Two Factor secret. These codes are time-based, so be sure it is current.

Request Samples

Response Samples

Responses

Personal Access Tokens List

GET https://api.linode.com/v4/profile/tokens

Returns a paginated list of Personal Access Tokens currently active for your User.

Authorizations

personalAccessToken
oauthaccount:read_only

Request Samples

Response Samples

Responses

Personal Access Token Create

POST https://api.linode.com/v4/profile/tokens

Creates 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.

Authorizations

personalAccessToken
oauthaccount:read_write

Request Body Schema

expiry
string <date-time>

When this token should be valid until. If omitted, the new token will be valid until it is manually revoked.

label
Filterable
string 1..100 characters

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.

scopes
string <oauth-scope>

The scopes to create the token with. These cannot be changed after creation, and may not exceed the scopes of the acting token. If omitted, the new token will have the same scopes as the acting token.

Request Samples

Response Samples

Responses

Personal Access Token Revoke

DELETE 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.

Authorizations

personalAccessToken
oauthaccount:read_write

Path Parameters

tokenIdinteger
Required

The ID of the token to access.

Request Samples

Response Samples

Responses

Personal Access Token View

GET https://api.linode.com/v4/profile/tokens/{tokenId}

Returns a single Personal Access Token.

Authorizations

personalAccessToken
oauthaccount:read_only

Path Parameters

tokenIdinteger
Required

The ID of the token to access.

Request Samples

Response Samples

Responses

Personal Access Token Update

PUT https://api.linode.com/v4/profile/tokens/{tokenId}

Updates a Personal Access Token.

Authorizations

personalAccessToken
oauthaccount:read_write

Path Parameters

tokenIdinteger
Required

The ID of the token to access.

Request Body Schema

label
Filterable
string 1..100 characters

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

Response Samples

Responses