Profile v4.166.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 Samples

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.

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

Phone Number Delete

DELETE https://api.linode.com/v4/profile/phone-number

Delete the verified phone number for the User making this request.

Use this command to opt out of SMS messages for the requesting User after a phone number has been verified with the Phone Number Verify ( POST /profile/phone-number/verify) command.

Authorizations

personalAccessToken
oauthaccount:read_write

Request Samples

Response Samples

Responses

Phone Number Verification Code Send

POST https://api.linode.com/v4/profile/phone-number

Send a one-time verification code via SMS message to the submitted phone number. Providing your phone number helps ensure you can securely access your Account in case other ways to connect are lost. Your phone number is only used to verify your identity by sending an SMS message. Standard carrier messaging fees may apply.

  • By accessing this command you are opting in to receive SMS messages. You can opt out of SMS messages by using the Phone Number Delete ( DELETE /profile/phone-number) command after your phone number is verified.

  • Verification codes are valid for 10 minutes after they are sent.

  • Subsequent requests made prior to code expiration result in sending the same code.

Once a verification code is received, verify your phone number with the Phone Number Verify ( POST /profile/phone-number/verify) command.

Authorizations

personalAccessToken
oauthaccount:read_write

Request Samples

Request Body Schema

iso_code
Required
string

The two-letter ISO 3166 country code associated with the phone number.

phone_number
Required
string<phone>

A valid phone number.

Response Samples

Responses

Phone Number Verify

POST https://api.linode.com/v4/profile/phone-number/verify

Verify a phone number by confirming the one-time code received via SMS message after accessing the Phone Verification Code Send ( POST /profile/phone-number) command.

  • Verification codes are valid for 10 minutes after they are sent.

  • Only the same User that made the verification code request can use that code with this command.

Once completed, the verified phone number is assigned to the User making the request. To change the verified phone number for a User, first use the Phone Number Delete ( DELETE /profile/phone-number) command, then begin the verification process again with the Phone Verification Code Send ( POST /profile/phone-number) command.

Authorizations

personalAccessToken
oauthaccount:read_write

Request Samples

Request Body Schema

otp_code
Required
string

The one-time code received via SMS message after accessing the Phone Verification Code Send ( POST /profile/phone-number) command.

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 Samples

Request Body Schema

Arbitrary JSON of your choosing. Overwrites any existing preferences for this user.

Total length cannot exceed 65,535 characters.

Response Samples

Responses

Security Questions List

GET https://api.linode.com/v4/profile/security-questions

Returns a collection of security questions and their responses, if any, for your User Profile.

Authorizations

personalAccessToken
oauthaccount:read_only

Request Samples

Response Samples

Responses

Security Questions Answer

POST https://api.linode.com/v4/profile/security-questions

Adds security question responses for your User.

Requires exactly three unique questions.

Previous responses are overwritten if answered or reset to null if unanswered.

Note: Security questions must be answered for your User prior to accessing the Two Factor Secret Create ( POST /profile/tfa-enable) command.

Authorizations

personalAccessToken
oauthaccount:read_write

Request Samples

Request Body Schema

security_questions
array of objects
question_id
integer

The ID representing the security question.

response
string 3..17 characters

The security question response.

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..500
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 Samples

Request Body Schema

label
string <= 64 characters

A label for the SSH Key.

ssh_key
string<ssh-key>

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

Accepted formats:

  • ssh-dss
  • ssh-rsa
  • ecdsa-sha2-nistp
  • ssh-ed25519
  • sk-ecdsa-sha2-nistp256 (Akamai-specific)

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.

Only SSH key labels can be updated.

Authorizations

personalAccessToken
oauthaccount:read_write

Path Parameters

sshKeyIdinteger
Required

The ID of the SSHKey

Request Samples

Request Body Schema

label
string <= 64 characters

A label for the SSH Key.

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. To enable TFA for your User, enter the secret obtained from this command with the Two Factor Authentication Confirm/Enable ( POST /profile/tfa-enable-confirm) command. Once enabled, logins from untrusted computers are required to provide a TFA code before they are successful.

Note: Before you can enable TFA, security questions must be answered for your User by accessing the Security Questions Answer ( POST /profile/security-questions) command.

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 Samples

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.

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 Samples

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
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 access scopes to grant to the created token. These cannot be changed after creation, and may not exceed the scopes of the acting token.

If omitted or entered with a wildcard character (*), the new token will have the same scopes as the acting token.

Multiple scopes are separated by a space character ( ).

For example, linodes:read_write account:read_only.

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 Samples

Request Body Schema

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

Response Samples

Responses