Profile v4.176.0
Profile View
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
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile
linode-cli profile view
Response Samples
{
"authentication_type": "password",
"authorized_keys": [
null
],
"email": "example-user@gmail.com",
"email_notifications": true,
"ip_whitelist_enabled": false,
"lish_auth_method": "keys_only",
"referrals": {
"code": "871be32f49c1411b14f29f618aaf0c14637fb8d3",
"completed": 0,
"credit": 0,
"pending": 0,
"total": 0,
"url": "https://www.linode.com/?r=871be32f49c1411b14f29f618aaf0c14637fb8d3"
},
"restricted": false,
"timezone": "US/Eastern",
"two_factor_auth": true,
"uid": 1234,
"username": "exampleUser",
"verified_phone_number": "+5555555555"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
authentication_type | string Enum:
password
github This account’s Cloud Manager authentication type. Authentication types are chosen through Cloud Manager and authorized when logging into your account. These authentication types are either the user’s password (in conjunction with their username), or the name of their indentity provider such as GitHub. For example, if a user:
Note: This functionality may not yet be available in Cloud Manager. See the Cloud Manager Changelog for the latest updates. | ||||||||||||
authorized_keys Nullable | array
of strings The list of SSH Keys authorized to use Lish for your User. This value is ignored if | ||||||||||||
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).
| ||||||||||||
referrals | object Information about your status in our referral program. This information becomes accessible after this Profile’s Account has established at least $25.00 USD of total payments.
| ||||||||||||
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. | ||||||||||||
uid | integer Your unique ID in our system. This value will never change, and can safely be used to identify your User. | ||||||||||||
username | string Your username, used for logging in to our system. | ||||||||||||
verified_phone_number Nullable | string<phone> The phone number verified for this Profile with the Phone Number Verify ( POST /profile/phone-number/verify) command.
|
errors | array
of objects
|
Profile Update
Update information in your Profile. This endpoint requires the “account:read_write” OAuth Scope.
Parent and child accounts
In a parent and child account environment, the following apply:
- You can’t edit the
email
for a child account parent user (proxy user). This value is fixed and set when you provision this environment.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"email": "example-user@gmail.com",
"timezone": "US/Eastern",
"email_notifications": true,
"lish_auth_method": "keys_only",
"authorized_keys": null,
"two_factor_auth": true,
"restricted": false
}' \
https://api.linode.com/v4/profile
linode-cli profile update \
--email example-user@gmail.com \
--timezone US/Eastern \
--email_notifications true \
--list_auth_method keys_only \
--two_factor_auth true \
--restricted false
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 |
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).
|
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
{
"authentication_type": "password",
"authorized_keys": [
null
],
"email": "example-user@gmail.com",
"email_notifications": true,
"ip_whitelist_enabled": false,
"lish_auth_method": "keys_only",
"referrals": {
"code": "871be32f49c1411b14f29f618aaf0c14637fb8d3",
"completed": 0,
"credit": 0,
"pending": 0,
"total": 0,
"url": "https://www.linode.com/?r=871be32f49c1411b14f29f618aaf0c14637fb8d3"
},
"restricted": false,
"timezone": "US/Eastern",
"two_factor_auth": true,
"uid": 1234,
"username": "exampleUser",
"verified_phone_number": "+5555555555"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
authentication_type | string Enum:
password
github This account’s Cloud Manager authentication type. Authentication types are chosen through Cloud Manager and authorized when logging into your account. These authentication types are either the user’s password (in conjunction with their username), or the name of their indentity provider such as GitHub. For example, if a user:
Note: This functionality may not yet be available in Cloud Manager. See the Cloud Manager Changelog for the latest updates. | ||||||||||||
authorized_keys Nullable | array
of strings The list of SSH Keys authorized to use Lish for your User. This value is ignored if | ||||||||||||
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).
| ||||||||||||
referrals | object Information about your status in our referral program. This information becomes accessible after this Profile’s Account has established at least $25.00 USD of total payments.
| ||||||||||||
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. | ||||||||||||
uid | integer Your unique ID in our system. This value will never change, and can safely be used to identify your User. | ||||||||||||
username | string Your username, used for logging in to our system. | ||||||||||||
verified_phone_number Nullable | string<phone> The phone number verified for this Profile with the Phone Number Verify ( POST /profile/phone-number/verify) command.
|
errors | array
of objects
|
Authorized Apps List
This is a collection of OAuth apps that you’ve given access to your Account, and includes the level of access granted.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/apps
linode-cli profile apps-list
Response Samples
{
"data": [
{
"created": "2018-01-01T00:01:01",
"expiry": "2018-01-15T00:01:01",
"id": 123,
"label": "example-app",
"scopes": "linodes:read_only",
"thumbnail_url": null,
"website": "example.org"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||
page | integer The current page. | ||||||||||||||
pages | integer The total number of pages. | ||||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
App Access Revoke
Expires this app token. This token may no longer be used to access your Account.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Path Parameters
appId | integer RequiredThe authorized app ID to manage. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/profile/apps/123
linode-cli profile app-delete 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Authorized App View
Returns information about a single app you’ve authorized to access your Account.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Path Parameters
appId | integer RequiredThe authorized app ID to manage. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/apps/123
linode-cli profile app-view 1234
Response Samples
{
"created": "2018-01-01T00:01:01",
"expiry": "2018-01-15T00:01:01",
"id": 123,
"label": "example-app",
"scopes": "linodes:read_only",
"thumbnail_url": null,
"website": "example.org"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> When this app was authorized. |
expiry Nullable | string<date-time> When the app’s access to your account expires. If |
id | integer This authorization’s ID, used for revoking access. |
label | string The name of the application you’ve authorized. |
scopes | string<oauth-scopes> The OAuth scopes this app was authorized with. This defines what parts of your Account the app is allowed to access. |
thumbnail_url | string<url> The URL at which this app’s thumbnail may be accessed. |
website | string<url> The website where you can get more information about this app. |
errors | array
of objects
|
Trusted Devices List
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 | |
oauth | account:read_only |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/devices
linode-cli profile devices-list
Response Samples
{
"data": [
{
"created": "2018-01-01T01:01:01",
"expiry": "2018-01-31T01:01:01",
"id": 123,
"last_authenticated": "2018-01-05T12:57:12",
"last_remote_addr": "203.0.113.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 Vivaldi/2.1.1337.36\n"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||
page | integer The current page. | ||||||||||||
pages | integer The total number of pages. | ||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
Trusted Device Revoke
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 | |
oauth | account:read_write |
Path Parameters
deviceId | integer RequiredThe ID of the TrustedDevice |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/profile/devices/123
linode-cli profile device-revoke 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Trusted Device View
Returns a single active TrustedDevice for your User.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Path Parameters
deviceId | integer RequiredThe ID of the TrustedDevice |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/devices/123
linode-cli profile device-view 123
Response Samples
{
"created": "2018-01-01T01:01:01",
"expiry": "2018-01-31T01:01:01",
"id": 123,
"last_authenticated": "2018-01-05T12:57:12",
"last_remote_addr": "203.0.113.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 Vivaldi/2.1.1337.36\n"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> When this Remember Me session was started. This corresponds to the time of login with the “Remember Me” box checked. |
expiry | string<date-time> When this TrustedDevice session expires. Sessions typically last 30 days. |
id | integer The unique ID for this TrustedDevice |
last_authenticated | string<date-time> The last time this TrustedDevice was successfully used to authenticate to login.linode.com. |
last_remote_addr | string The last IP Address to successfully authenticate with this TrustedDevice. |
user_agent | string The User Agent of the browser that created this TrustedDevice session. |
errors | array
of objects
|
Grants List
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
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/grants
Response Samples
{
"database": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
],
"domain": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
],
"global": {
"account_access": "read_only",
"add_databases": true,
"add_domains": true,
"add_firewalls": true,
"add_images": true,
"add_linodes": true,
"add_longview": true,
"add_nodebalancers": true,
"add_stackscripts": true,
"add_volumes": true,
"add_vpcs": true,
"cancel_account": false,
"child_account_access": true,
"longview_subscription": true
},
"image": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
],
"linode": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
],
"longview": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
],
"nodebalancer": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
],
"stackscript": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
],
"volume": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
],
"vpc": [
{
"id": 123,
"label": "example-entity",
"permissions": "read_only"
}
]
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
database | array
of objects The grants this User has for each Database that is owned by this Account.
| ||||||||||||||||||||||||||||
domain | array
of objects The grants this User has for each Domain that is owned by this Account.
| ||||||||||||||||||||||||||||
global | object A structure containing the Account-level grants a User has.
| ||||||||||||||||||||||||||||
image | array
of objects The grants this User has for each Image that is owned by this Account.
| ||||||||||||||||||||||||||||
linode | array
of objects The grants this User has for each Linode that is owned by this Account.
| ||||||||||||||||||||||||||||
longview | array
of objects The grants this User has for each Longview Client that is owned by this Account.
| ||||||||||||||||||||||||||||
nodebalancer | array
of objects The grants this User has for each NodeBalancer that is owned by this Account.
| ||||||||||||||||||||||||||||
stackscript | array
of objects The grants this User has for each StackScript that is owned by this Account.
| ||||||||||||||||||||||||||||
volume | array
of objects The grants this User has for each Block Storage Volume that is owned by this Account.
| ||||||||||||||||||||||||||||
vpc | array
of objects The grants this User has for each VPC that is owned by this Account.
|
errors | array
of objects
|
Logins List
Returns a collection of successful account logins from this user during the last 90 days.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/logins
linode-cli profile logins-list
Response Samples
{
"data": [
{
"datetime": "2018-01-01T00:01:01",
"id": 1234,
"ip": "192.0.2.0",
"restricted": true,
"status": "successful",
"username": "example_user"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||
page | integer The current page. | ||||||||||||
pages | integer The total number of pages. | ||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
Login View
Returns a login object displaying information about a successful account login from this user.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Path Parameters
loginId | integer RequiredThe ID of the login object to access. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/logins/1234
linode-cli profile login-view 1234
Response Samples
{
"datetime": "2018-01-01T00:01:01",
"id": 1234,
"ip": "192.0.2.0",
"restricted": true,
"status": "successful",
"username": "example_user"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
datetime | string<date-time> When the login was initiated. |
id | integer The unique ID of this login object. |
ip | string<ip> The remote IP address that requested the login. |
restricted | boolean True if the User that attempted the login was a restricted User, false otherwise. |
status | string Enum:
successful
failed Whether the login attempt succeeded or failed. |
username | string The username of the User that attempted the login. |
errors | array
of objects
|
Phone Number Delete
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 | |
oauth | account:read_write |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/profile/phone-number
linode-cli phone delete
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Phone Number Verification Code Send
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 | |
oauth | account:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"iso_code": "US",
"phone_number": "555-555-5555"
}' \
https://api.linode.com/v4/profile/phone-number
linode-cli phone sms-code-send \
--iso-code US \
--phone-number 555-555-5555
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
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
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 | |
oauth | account:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"otp_code": "123456"
}' \
https://api.linode.com/v4/profile/phone-number/verify
linode-cli phone verify \
--otp_code 123456
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
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
User Preferences View
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 | |
oauth | account:read_only |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/preferences
Response Samples
{
"key1": "value1",
"key2": "value2"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
A dictionary of user preferences.
errors | array
of objects
|
User Preferences Update
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 | |
oauth | account:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"key1": "value1",
"key2": "value2"
}' \
https://api.linode.com/v4/profile/preferences
Request Body Schema
Arbitrary JSON of your choosing. Overwrites any existing preferences for this user.
Total length cannot exceed 65,535 characters.
Response Samples
{
"key1": "value1",
"key2": "value2"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
An object of user preferences.
errors | array
of objects
|
Security Questions List
Returns a collection of security questions and their responses, if any, for your User Profile.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/security-questions
linode-cli security-questions list
Response Samples
{
"security_questions": [
{
"id": 1,
"question": "In what city were you born?",
"response": "Gotham City"
}
]
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
security_questions | array
of objects
|
errors | array
of objects
|
Security Questions Answer
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 | |
oauth | account:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"security_questions": [
{
"question_id": 1,
"response": "secret answer 1"
},
{
"question_id": 2,
"response": "secret answer 2"
},
{
"question_id": 11,
"response": "secret answer 3"
}
]
}' \
https://api.linode.com/v4/profile/security-questions
Request Body Schema
security_questions | array
of objects
|
Response Samples
{
"security_questions": [
{
"question_id": 1,
"response": "Gotham City",
"security_question": "In what city were you born?"
}
]
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
security_questions | array
of objects
|
errors | array
of objects
|
SSH Keys List
Returns a collection of SSH Keys you’ve added to your Profile.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/sshkeys
linode-cli sshkeys list
Response Samples
{
"data": [
{
"created": "2018-01-01T00:01:01",
"id": 42,
"label": "My SSH Key",
"ssh_key": "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||
page | integer The current page. | ||||||||
pages | integer The total number of pages. | ||||||||
results | integer The total number of results. |
errors | array
of objects
|
SSH Key Add
Adds an SSH Key to your Account profile.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "My SSH Key",
"ssh_key": "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
}' \
https://api.linode.com/v4/profile/sshkeys
linode-cli sshkeys create \
--label "My SSH Key" \
--ssh_key "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
Request Body Schema
label | string
<=
64
charactersA 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:
|
Response Samples
{
"created": "2018-01-01T00:01:01",
"id": 42,
"label": "My SSH Key",
"ssh_key": "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> The date this key was added. |
id | integer The unique identifier of an SSH Key object. |
label | string
<=
64
charactersA 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:
|
errors | array
of objects
|
SSH Key Delete
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 | |
oauth | account:read_write |
Path Parameters
sshKeyId | integer RequiredThe ID of the SSHKey |
Request Samples
curl -H "Authoriztion: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/profile/sshkeys/42
linode-cli sshkeys delete 42
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
SSH Key View
Returns a single SSH Key object identified by id
that you have access to view.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Path Parameters
sshKeyId | integer RequiredThe ID of the SSHKey |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/sshkeys/42
linode-cli sshkeys view 42
Response Samples
{
"created": "2018-01-01T00:01:01",
"id": 42,
"label": "My SSH Key",
"ssh_key": "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> The date this key was added. |
id | integer The unique identifier of an SSH Key object. |
label | string
<=
64
charactersA 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:
|
errors | array
of objects
|
SSH Key Update
Updates an SSH Key that you have permission to read_write
.
Only SSH key labels can be updated.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Path Parameters
sshKeyId | integer RequiredThe ID of the SSHKey |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "my laptop"
}' \
https://api.linode.com/v4/profile/sshkeys/42
linode-cli sshkeys update 42 \
--label "my laptop"
Request Body Schema
label | string
<=
64
charactersA label for the SSH Key. |
Response Samples
{
"created": "2018-01-01T00:01:01",
"id": 42,
"label": "My SSH Key",
"ssh_key": "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> The date this key was added. |
id | integer The unique identifier of an SSH Key object. |
label | string
<=
64
charactersA 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:
|
errors | array
of objects
|
Two Factor Authentication 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 | |
oauth | account:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/profile/tfa-disable
linode-cli profile tfa-disable
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Two Factor Secret Create
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 | |
oauth | account:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/profile/tfa-enable
linode-cli profile tfa-enable
Response Samples
{
"expiry": "2018-03-01T00:01:01",
"secret": "5FXX6KLACOC33GTC"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
expiry | string<date-time> When this Two Factor secret expires. |
secret | string Your Two Factor secret. This is used to generate time-based two factor codes required for logging in. Doing this will be required to confirm TFA an actually enable it. |
errors | array
of objects
|
Two Factor Authentication Confirm/Enable
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 | |
oauth | account:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"tfa_code": "213456"
}' \
https://api.linode.com/v4/profile/tfa-enable-confirm
linode-cli profile tfa-confirm \
--tfa_code 213456
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
{
"scratch": "sample two factor scratch"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
scratch | string A one-use code that can be used in place of your Two Factor code, in case you are unable to generate one. Keep this in a safe place to avoid being locked out of your Account. |
errors | array
of objects
|
Personal Access Tokens List
Returns a paginated list of Personal Access Tokens currently active for your User.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/tokens
linode-cli profile tokens-list
Response Samples
{
"data": [
{
"created": "2018-01-01T00:01:01",
"expiry": "2018-01-01T13:46:32",
"id": 123,
"label": "linode-cli",
"scopes": "*",
"token": "abcdefghijklmnop"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||
page | integer The current page. | ||||||||||||
pages | integer The total number of pages. | ||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
Personal Access Token Create
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. Parent and child accounts In a parent and child account environment, the following apply:
- If you’re using a child account parent user (proxy user), you can’t create this form of token. The only token available to a proxy user is one that lets you run operations in a child account. These are created via the Proxy User Token Create operation.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"scopes": "*",
"expiry": "2018-01-01T13:46:32",
"label": "linode-cli"
}' \
https://api.linode.com/v4/profile/tokens
linode-cli profile token-create \
--scopes '*' \
--expiry '2018-01-01T13:46:32' \
--label linode-cli
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
charactersThis 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 ( Multiple scopes are separated by a space character ( For example, |
Response Samples
{
"created": "2018-01-01T00:01:01",
"expiry": "2018-01-01T13:46:32",
"id": 123,
"label": "linode-cli",
"scopes": "*",
"token": "abcdefghijklmnop"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> The date and time this token was created. |
expiry | string<date-time> 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. |
id | integer This token’s unique ID, which can be used to revoke it. |
label | string
1..100
charactersThis 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-scopes> 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 |
token | string 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. |
errors | array
of objects
|
Personal Access Token Revoke
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 | |
oauth | account:read_write |
Path Parameters
tokenId | integer RequiredThe ID of the token to access. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/profile/tokens/123
linode-cli profile token-delete 123
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
Personal Access Token View
Returns a single Personal Access Token.
Authorizations
personalAccessToken | |
oauth | account:read_only |
Path Parameters
tokenId | integer RequiredThe ID of the token to access. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/profile/tokens/123
linode-cli profile token-view 123
Response Samples
{
"created": "2018-01-01T00:01:01",
"expiry": "2018-01-01T13:46:32",
"id": 123,
"label": "linode-cli",
"scopes": "*",
"token": "abcdefghijklmnop"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> The date and time this token was created. |
expiry | string<date-time> 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. |
id | integer This token’s unique ID, which can be used to revoke it. |
label | string
1..100
charactersThis 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-scopes> 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 |
token | string 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. |
errors | array
of objects
|
Personal Access Token Update
Updates a Personal Access Token.
Authorizations
personalAccessToken | |
oauth | account:read_write |
Path Parameters
tokenId | integer RequiredThe ID of the token to access. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "linode-cli"
}' \
https://api.linode.com/v4/profile/tokens/123
linode-cli profile token-update 123 \
--label linode-cli
Request Body Schema
label | string
1..100
charactersThis 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
{
"created": "2018-01-01T00:01:01",
"expiry": "2018-01-01T13:46:32",
"id": 123,
"label": "linode-cli",
"scopes": "*",
"token": "abcdefghijklmnop"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> The date and time this token was created. |
expiry | string<date-time> 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. |
id | integer This token’s unique ID, which can be used to revoke it. |
label | string
1..100
charactersThis 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-scopes> 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 |
token | string 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. |
errors | array
of objects
|