Account
Users List
https://api.linode.com/v4/account/users
Returns a paginated list of Users on your Account.
This command can only be accessed by the unrestricted users of an account.
Users may access all or part of your Account based on their restricted status and grants. An unrestricted User may access everything on the account, whereas restricted User may only access entities or perform actions they've been given specific grants to.
Query Parameters
The page of a collection to return.
The number of items to return per page.
Request Samples
- Shell
- CLI
curl -H "Authorization: Bearer $TOKEN" \
https://api.linode.com/v4/account/users
Response Samples
- 200
- default
{
"data": [
{
"username": "example_user",
"restricted": true,
"email": "example_user@linode.com",
"ssh_keys": [
"home-pc",
"laptop"
],
"tfa_enabled": true,
"verified_phone_number": "+5555555555",
"password_created": "2018-01-01T01:01:01",
"last_login": {
"login_datetime": "2018-01-01T01:01:01",
"status": "successful"
}
}
],
"page": 1,
"pages": 1,
"results": 1
}
Responses
200: A paginated list of Users.
The User's username. This is used for logging in, and may also be displayed alongside actions the User performs (for example, in Events or public StackScripts).
If true, the User must be granted access to perform actions or access entities on this Account. See User Grants View (GET /account/users/{username}/grants) for details on how to configure grants for a restricted User.
The email address for the User. Linode sends emails to this address for account management communications. May be used for other communications as configured.
A list of SSH Key labels added by this User.
Users can add keys with the SSH Key Add (POST /profile/sshkeys) command.
These keys are deployed when this User is included in the authorized_users
field of the following requests:
- Linode Create (POST /linode/instances)
- Linode Rebuild (POST /linode/instances/{linodeId}/rebuild)
- Disk Create (POST /linode/instances/{linodeId}/disks)
A boolean value indicating if the User has Two Factor Authentication (TFA) enabled. See the Create Two Factor Secret (POST /profile/tfa-enable) endpoint to enable TFA.
The phone number verified for this User Profile with the Phone Number Verify (POST /profile/phone-number/verify) command.
null
if this User Profile has no verified phone number.
The date and time when this User's current password was created.
User passwords are first created during the Account sign-up process, and updated using the Reset Password webpage.
null
if this User has not created a password yet.
Information for the most recent login attempt for this User.
null
if no login attempts have been made since creation of this User.
Access the User Logins List All command for additional login information.
The date and time of this User's most recent login attempt.
The result of the most recent login attempt for this User.
The current page.
The total number of pages.
The total number of results.
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.
User Create
https://api.linode.com/v4/account/users
Creates a User on your Account. Once created, a confirmation message containing password creation and login instructions is sent to the User's email address.
This command can only be accessed by the unrestricted users of an account.
The User's account access is determined by whether or not they are restricted, and what grants they have been given.
Request Body Schema
The email address for the User. Linode sends emails to this address for account management communications. May be used for other communications as configured.
If true, the User must be granted access to perform actions or access entities on this Account. See User Grants View (GET /account/users/{username}/grants) for details on how to configure grants for a restricted User.
Request Samples
- Shell
- CLI
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"username": "example_user",
"email": "person@place.com",
"restricted": true
}' \
https://api.linode.com/v4/account/users
Response Samples
- 200
- default
{
"username": "example_user",
"email": "example_user@linode.com",
"restricted": true,
"ssh_keys": [],
"tfa_enabled": true,
"verified_phone_number": "+5555555555",
"password_created": "2018-01-01T01:01:01",
"last_login": {
"login_datetime": "2018-01-01T01:01:01",
"status": "successful"
}
}
Responses
200: New User created successfully.
The User's username. This is used for logging in, and may also be displayed alongside actions the User performs (for example, in Events or public StackScripts).
The email address for the User. Linode sends emails to this address for account management communications. May be used for other communications as configured.
If true, the User must be granted access to perform actions or access entities on this Account. See User Grants View (GET /account/users/{username}/grants) for details on how to configure grants for a restricted User.
A list of SSH Key labels added by this User.
Users can add keys with the SSH Key Add (POST /profile/sshkeys) command.
These keys are deployed when this User is included in the authorized_users
field of the following requests:
- Linode Create (POST /linode/instances)
- Linode Rebuild (POST /linode/instances/{linodeId}/rebuild)
- Disk Create (POST /linode/instances/{linodeId}/disks)
A boolean value indicating if the User has Two Factor Authentication (TFA) enabled. See the Create Two Factor Secret (POST /profile/tfa-enable) endpoint to enable TFA.
The phone number verified for this User Profile with the Phone Number Verify (POST /profile/phone-number/verify) command.
null
if this User Profile has no verified phone number.
The date and time when this User's current password was created.
User passwords are first created during the Account sign-up process, and updated using the Reset Password webpage.
null
if this User has not created a password yet.
Information for the most recent login attempt for this User.
null
if no login attempts have been made since creation of this User.
Access the User Logins List All command for additional login information.
The date and time of this User's most recent login attempt.
The result of the most recent login attempt for this User.
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.