
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
cloudnode-ts
Advanced tools
A client library for the Cloudnode API, written in TypeScript. [Documentation](https://github.com/cloudnode-pro/ts-client#documentation)
A client library for the Cloudnode API, written in TypeScript. Documentation
npm install cloudnode-ts
import Cloudnode from 'cloudnode-ts';
const cloudnode = new Cloudnode("token_YourSecretToken123");
// get a newsletter
const newsletter = await cloudnode.newsletter.get("newsletter_123asd");
// get response status code
console.log(newsletter._response.status); // 200
const Cloudnode = require('cloudnode-ts');
const cloudnode = new Cloudnode("token_YourSecretToken123");
// get a newsletter
const newsletter = await cloudnode.newsletter.get("newsletter_123asd");
console.log(newsletter._response.status); // 200
Download the browser version from browser/Cloudnode.js
or use our hosted version.
<script src="https://cdn.jsdelivr.net/npm/cloudnode-ts@latest/browser/Cloudnode.min.js"></script>
<script>
const cloudnode = new Cloudnode();
// get a newsletter
const newsletter = await cloudnode.newsletter.get("newsletter_123asd");
console.log(newsletter._response.status); // 200
</script>
Warning: You most likely don't want to set your private token in a public front-end website, as this will allow anyone who sees your front-end JavaScript code to use it for possibly malicious purposes. We advise you use a back-end server to proxy requests to our API, so you do not expose your token to the public.
import Cloudnode from 'cloudnode-ts';
const cloudnode = new Cloudnode("token_YourSecretToken123");
// get a newsletter
const newsletter: Cloudnode.Newsletter = await cloudnode.newsletter.get("newsletter_123asd");
If you want to access response metadata (headers, status code, etc.), use Cloudnode.ApiResponse<T>
, e.g.:
const newsletter: Cloudnode.ApiResponse<Cloudnode.Newsletter> = await cloudnode.newsletter.get("newsletter_123asd");
console.log(newsletter.id); // newsletter_123asd
console.log(newsletter._response.status); // 200
new Cloudnode([token], [options])
cloudnode.getPage<T>(response, page)
cloudnode.getNextPage<T>(response)
cloudnode.getPreviousPage<T>(response)
cloudnode.getAllPages<T>(response)
cloudnode.checkCompatibility()
cloudnode.account.changePassword(currentPassword, newPassword)
cloudnode.account.get()
cloudnode.account.getEmail()
cloudnode.account.getIdentity()
cloudnode.account.listEmails()
cloudnode.account.listPermissions()
cloudnode.account.replaceIdentity(username, name)
cloudnode.account.setEmail(email)
cloudnode.account.updateIdentity(username, [name])
cloudnode.auth.login(user, password)
cloudnode.auth.register(username, email, password)
cloudnode.newsletters.get(id)
cloudnode.newsletters.list([limit], [page])
cloudnode.projects.create(name)
cloudnode.projects.delete(id)
cloudnode.projects.get(id)
cloudnode.projects.list([limit], [page])
cloudnode.projects.update(id, name)
cloudnode.subscriptions.create(newsletter, email, [data])
cloudnode.subscriptions.delete(id)
cloudnode.subscriptions.get(id)
cloudnode.subscriptions.list([limit], [page])
cloudnode.tokens.create(permissions, lifetime, [note])
cloudnode.tokens.get(id)
cloudnode.tokens.getRequest(id, request)
cloudnode.tokens.list([limit], [page], [internal])
cloudnode.tokens.listRequests(id, [limit], [page])
cloudnode.tokens.refresh(id)
cloudnode.tokens.revoke(id)
Cloudnode.ApiResponse<T>
Cloudnode.RawResponse
Cloudnode.CompatibilityStatus
Cloudnode.AccountDetails
Cloudnode.AccountEmail
Cloudnode.AccountIdentity
Cloudnode.DatedNewsletterSubscription
Cloudnode.DatedPrimaryEmail
Cloudnode.Error
Cloudnode.Newsletter
Cloudnode.NewsletterData
Cloudnode.NewsletterSubscription
Cloudnode.Options
Cloudnode.PaginatedData<T>
Cloudnode.PartialToken
Cloudnode.Permission
Cloudnode.PrimaryEmail
Cloudnode.Project
Cloudnode.Request
Cloudnode.ShortRequest
Cloudnode.Token
Cloudnode.TokenMetadata
Cloudnode
A client library for the Cloudnode API, written in TypeScript. Documentation
new Cloudnode([token], [options])
Construct a new Cloudnode API client
token
string
API token to use for requests.options
Partial<Cloudnode.Options>
API client options. Default: {baseUrl: "https://api.cloudnode.pro/v5/", autoRetry: true, maxRetryDelay: 5, maxRetries: 3}
cloudnode.getPage<T>(response, page)
Get another page of paginated results
response
Cloudnode.ApiResponse<Cloudnode.PaginatedData<T>>
Response to get a different page of.page
number
Page to get.Promise<Cloudnode.ApiResponse<Cloudnode.PaginatedData<T>> | null>
The new page or null if the page is out of boundsCloudnode.Error
Error returned by the APIcloudnode.getNextPage<T>(response)
Get next page of paginated results
response
Cloudnode.ApiResponse<Cloudnode.PaginatedData<T>>
Response to get the next page of.Promise<Cloudnode.ApiResponse<Cloudnode.PaginatedData<T>> | null>
The next page or null if this is the last pageCloudnode.Error
Error returned by the APIcloudnode.getPreviousPage<T>(response)
Get previous page of paginated results
response
Cloudnode.ApiResponse<Cloudnode.PaginatedData<T>>
Response to get the previous page of.Promise<Cloudnode.ApiResponse<Cloudnode.PaginatedData<T>> | null>
The previous page or null if this is the first pageCloudnode.Error
Error returned by the APIcloudnode.getAllPages<T>(response)
Get all other pages of paginated results and return the complete data
Warning: Depending on the amount of data, this can take a long time and use a lot of memory.
response
Cloudnode.ApiResponse<Cloudnode.PaginatedData<T>>
Response to get all pages of.Promise<Cloudnode.PaginatedData<T>>
All of the data in 1 pageCloudnode.Error
Error returned by the APIcloudnode.checkCompatibility()
Check compatibility with the API
Promise<Cloudnode.CompatibilityStatus>
cloudnode.account.changePassword(currentPassword, newPassword)
Change account password. Requires token with scope account.details.password.update
.
currentPassword
string
Your current password.newPassword
string
The new password. Must be at least 15 characters, or 8 characters if it contains a mix of letters, numbers and symbols.Promise<Cloudnode.ApiResponse<void>>
Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.account.get()
Get account details. Requires token with scope account.details
.
Promise<Cloudnode.ApiResponse<Cloudnode.AccountDetails>>
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.account.getEmail()
Get your primary e-mail address. Requires token with scope account.details.email
.
Promise<Cloudnode.ApiResponse<Cloudnode.DatedPrimaryEmail>>
Cloudnode.Error & {code: "RESOURCE_NOT_FOUND"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.account.getIdentity()
Get account identity. Requires token with scope account.details.identity
.
Promise<Cloudnode.ApiResponse<Cloudnode.AccountIdentity>>
Cloudnode.Error & {code: "RESOURCE_NOT_FOUND"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.account.listEmails()
List account e-mail addresses. Requires token with scope account.details.email.list
.
Promise<Cloudnode.ApiResponse<Cloudnode.PaginatedData<Cloudnode.AccountEmail[]>>>
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.account.listPermissions()
List account permissions with user-friendly descriptions. Some permissions (such as wildcard ones) may be excluded in this list if they don't have a description. Requires token with scope account.details
.
Promise<Cloudnode.ApiResponse<Cloudnode.PaginatedData<Cloudnode.Permission[]>>>
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.account.replaceIdentity(username, name)
Replace account identity. Requires token with scope account.details.identity.update
.
username
string
Your unique username. Between 3 and 20 characters. Only letters, numbers, dashes and underscores. May not start with user_
.name
string | null
Your full name. Set to null
to remove. Min 2 characters, max 32. Allowed characters (lowercase as well): A–Z ',-.,
and ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞSŸ
.Promise<Cloudnode.ApiResponse<Cloudnode.AccountIdentity>>
Cloudnode.Error & {code: "RESOURCE_NOT_FOUND"}
Cloudnode.Error & {code: "CONFLICT"}
Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.account.setEmail(email)
Set your primary e-mail address. Requires token with scope account.details.email.update
.
email
string
E-mail address to set as primary.Promise<Cloudnode.ApiResponse<void>>
Cloudnode.Error & {code: "CONFLICT"}
Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.account.updateIdentity(username, [name])
Update account identity. Requires token with scope account.details.identity.update
.
username
string
Your unique username. Between 3 and 20 characters. Only letters, numbers, dashes and underscores. May not start with user_
.name
string | null
Your full name. Set to null
to remove. Min 2 characters, max 32. Allowed characters (lowercase as well): A–Z ',-.,
and ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞSŸ
.Promise<Cloudnode.ApiResponse<Cloudnode.AccountIdentity | void>>
void
if nothing was changed.Cloudnode.Error & {code: "RESOURCE_NOT_FOUND"}
Cloudnode.Error & {code: "CONFLICT"}
Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.auth.login(user, password)
Create a session using user ID/username/e-mail and password.
Note: Logging in can only be performed from residential IP. Proxying this endpoint will likely not work. It is normally not recommended to use this endpoint to gain API access. Instead, create a token from your account to use with the API.
user
string
User ID (starts with user_
), username or e-mail address.password
string
The password of the account.Promise<Cloudnode.ApiResponse<{session: string}>>
Session token. Also returned in Set-Cookie
header.Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "IP_REJECTED"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.auth.register(username, email, password)
Create an account and session. After signing up, a welcome e-mail is sent to confirm your e-mail address.
Note: Registering an account can only be performed from residential IP. Proxying this endpoint will likely not work. Creating multiple/alternate accounts is not allowed as per the Terms of Service.
username
string
The username to use for the account. Must be between 3 and 20 characters long. Cannot start with user_
. May contain only letters, numbers, dashes and underscores. Must be unique.email
string
The e-mail address to register. A valid unique non-disposable e-mail that can receive mail is required.password
string
The password to use for the account. Must be at least 15 characters, or 8 characters if it contains a mix of letters, numbers and symbols.Promise<Cloudnode.ApiResponse<{session: string}>>
Session token. Also returned in Set-Cookie
header.Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "IP_REJECTED"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.newsletters.get(id)
Get newsletter
id
string
A newsletter ID.Promise<Cloudnode.ApiResponse<Cloudnode.Newsletter>>
Cloudnode.Error & {code: "RESOURCE_NOT_FOUND"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.newsletters.list([limit], [page])
List newsletters
limit
number
The number of newsletters to return per page. No more than 50. Default: 10
page
number
The page number. No more than 2³² (4294967296). Default: 1
Promise<Cloudnode.ApiResponse<Cloudnode.PaginatedData<Cloudnode.Newsletter[]>>>
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.projects.create(name)
Create a project. Requires token with scope projects.create.own
.
name
string
Project name. Max 255 characters.Promise<Cloudnode.ApiResponse<Cloudnode.Project>>
Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.projects.delete(id)
Delete a project. Requires token with scope projects.delete.own
.
id
string
Project ID.Promise<Cloudnode.ApiResponse<void>>
Cloudnode.Error & {code: "RESOURCE_NOT_FOUND"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.projects.get(id)
Get a project. Requires token with scope projects.get.own
.
id
string
Project ID.Promise<Cloudnode.ApiResponse<Cloudnode.Project>>
Cloudnode.Error & {code: "RESOURCE_NOT_FOUND"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.projects.list([limit], [page])
List projects. Requires token with scope projects.get.own
.
limit
number
The number of projects to return per page. No more than 100. Default: 20
page
number
The page number. No more than 2³² (4294967296). Default: 1
Promise<Cloudnode.ApiResponse<Cloudnode.PaginatedData<Cloudnode.Project[]>>>
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.projects.update(id, name)
Update a project. Requires token with scope projects.update.own
.
id
string
Project ID.name
string
Project name. Max 255 characters.Promise<Cloudnode.ApiResponse<Cloudnode.Project>>
Cloudnode.Error & {code: "RESOURCE_NOT_FOUND"}
Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.subscriptions.create(newsletter, email, [data])
Subscribe to newsletter
newsletter
string
The ID of the newsletter to subscribe to.email
string
Subscriber's email address.data
Record<string, string | number | boolean>
Additional data that this newsletter requires.Promise<Cloudnode.ApiResponse<Cloudnode.NewsletterSubscription>>
Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "CONFLICT"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.subscriptions.delete(id)
Unsubscribe from newsletter
id
string
The ID of the subscription to revoke.Promise<Cloudnode.ApiResponse<void>>
Cloudnode.Error & {code: "RESOURCE_NOT_FOUND"}
Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.subscriptions.get(id)
Get newsletter subscription
id
string
The ID of the subscription to get.Promise<Cloudnode.ApiResponse<Cloudnode.DatedNewsletterSubscription>>
Cloudnode.Error & {code: "RESOURCE_NOT_FOUND"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.subscriptions.list([limit], [page])
List newsletter subscriptions. Requires token with scope newsletter.subscriptions.list.own
.
limit
number
The number of subscriptions to return per page. No more than 50. Default: 10
page
number
The page number. No more than 2³² (4294967296). Default: 1
Promise<Cloudnode.ApiResponse<Cloudnode.PaginatedData<Cloudnode.DatedNewsletterSubscription[]>>>
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.tokens.create(permissions, lifetime, [note])
Create token. Requires token with scope tokens.create.own
.
permissions
string[]
List of permissions to grant to the token. You must already have each of these permissions with your current token.lifetime
number
Lifetime of the token in seconds. If null, the token will never expire (not recommended). Max: 31560000 (1 year). Min: 60 (1 minute).note
string
A user-specified note to label the token. Max length: 2⁸ (256) characters.Promise<Cloudnode.ApiResponse<Cloudnode.Token>>
Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.tokens.get(id)
Get token details. Requires token with scope tokens.get.own
.
id
string | "current"
The ID of the token to get. Specify current
to get information about the token that was used to authenticate the request.Promise<Cloudnode.ApiResponse<Cloudnode.Token>>
Cloudnode.Error & {code: "RESOURCE_NOT_FOUND"}
Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.tokens.getRequest(id, request)
Get a recent request by ID. Requires token with scope tokens.get.own.requests
.
id
string | "current"
The ID of the token. Specify current
to get information about the token that was used to authenticate the request.request
string
The ID of the request.Promise<Cloudnode.ApiResponse<Cloudnode.Request>>
Cloudnode.Error & {code: "RESOURCE_NOT_FOUND"}
Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "MODIFICATION_NOT_ALLOWED"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.tokens.list([limit], [page], [internal])
List tokens of user. Requires token with scope tokens.list.own
.
limit
number
The number of tokens to return per page. No more than 50. Default: 10
page
number
The page number. No more than 2³² (4294967296). Default: 1
internal
any
Internal tokens are returned as well if this parameter is present.Promise<Cloudnode.ApiResponse<Cloudnode.PaginatedData<Cloudnode.PartialToken[]>>>
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.tokens.listRequests(id, [limit], [page])
Get list of recent requests made with the token. Requires token with scope tokens.get.own.requests
.
id
string | "current"
The ID of the token. Specify current
to get information about the token that was used to authenticate the request.limit
number
The number of requests to return per page. No more than 50. Default: 10
page
number
The page number. No more than 2³² (4294967296). Default: 1
Promise<Cloudnode.ApiResponse<Cloudnode.PaginatedData<Cloudnode.ShortRequest[]>>>
Cloudnode.Error & {code: "RESOURCE_NOT_FOUND"}
Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.tokens.refresh(id)
Refresh current token. The token that was used to authenticate the request will be deleted. A new token with a new ID but the same permissions will be created and returned. The lifespan of the new token will be the same as the old one, starting from the time of the request. This operation effectively allows a token to be used indefinitely. Requires token with scope token.refresh
.
id
string | "current"
The ID of the token to refresh. Specify current
to refresh the token that was used to authenticate the request.Promise<Cloudnode.ApiResponse<Cloudnode.Token>>
Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
cloudnode.tokens.revoke(id)
Revoke token. Requires token with scope tokens.revoke.own
.
id
string | "current"
The ID of the token to revoke. Specify current
to revoke the token that was used to authenticate the request.Promise<Cloudnode.ApiResponse<void>>
Cloudnode.Error & {code: "RESOURCE_NOT_FOUND"}
Cloudnode.Error & {code: "INVALID_DATA"}
Cloudnode.Error & {code: "MODIFICATION_NOT_ALLOWED"}
Cloudnode.Error & {code: "UNAUTHORIZED"}
Cloudnode.Error & {code: "NO_PERMISSION"}
Cloudnode.Error & {code: "RATE_LIMITED"}
Cloudnode.Error & {code: "INTERNAL_SERVER_ERROR"}
Cloudnode.Error & {code: "MAINTENANCE"}
Cloudnode
A client library for the Cloudnode API, written in TypeScript. Documentation
Cloudnode.ApiResponse<T>
An API response. This class implements the interface provided as T
and includes all of its properties.
_response
Cloudnode.RawResponse
Raw API responseCloudnode.RawResponse
Raw API response
headers
Record<string, string>
The headers returned by the server. (read-only)ok
boolean
A boolean indicating whether the response was successful (status in the range 200
– 299
) or not. (read-only)redirected
boolean
Indicates whether or not the response is the result of a redirect (that is, its URL list has more than one entry). (read-only)status
number
The status code of the response. (read-only)statusText
string
The status message corresponding to the status code. (e.g., OK
for 200
). (read-only)url
string
The URL of the response. (read-only)Cloudnode.CompatibilityStatus
API client compatibility status
COMPATIBLE
"compatible"
Fully compatible (API patch version may differ)OUTDATED
"outdated"
Compatible, but outdated (i.e. existing APIs will work, but you are missing out on new features).INCOMPATIBLE
"incompatible"
API has implemented breaking changes which are not compatible with this client.Cloudnode.AccountDetails
Details about your account
id
string
Your user IDpassword
boolean
Whether you have a password setgroup
string
The name of your permission grouppermissions
string[]
A list of all permission that you have access toidentity
AccountIdentity | null
Personal information associated with your account. Requires account.details.identity
to see. Maybe be null if the account is anonymised or you don't have permission to access the account identity.email
PrimaryEmail | null
Your current primary account e-mail address. Requires account.details.email
to see. Maybe be null if you don't have a primary e-mail address or you don't have permission to access the account's e-mail address.Cloudnode.AccountEmail
An e-mail address you have added to your account
id
string
The ID of the e-mail addressaddress
string | null
Your e-mail address. May ben null if anonymised.verified
boolean
Whether this e-mail address has been verifiedprimary
boolean
Whether this e-mail address is your primary e-mail addressadded
Date
The date and time when this e-mail address was added to your accountCloudnode.AccountIdentity
Personal information associated with your account
Cloudnode.DatedNewsletterSubscription
A newsletter subscription with a creation date
id
string
The ID of the subscription. Can be used to unsubscribe.email
string
The email address of the subscribernewsletter
string
The ID of the newsletter that was subscribed todate
Date
The date the subscription was createdCloudnode.DatedPrimaryEmail
Your current primary account e-mail address with a timestamp of when it was added to your account
id
string
The ID of the e-mail addressaddress
string | null
Your e-mail address. May ben null if anonymised.verified
boolean
Whether this e-mail address has been verifiedadded
Date
The date and time when this e-mail address was added to your accountCloudnode.Error
An API error response.
message
string
A human-readable description of this errorcode
string
Error codefields
Record<string, string | Record<string, string>>
Affected request fields. The key is the name of the input parameter (e.g. from the request body or query string) and the value is a human-readable error message for that field.Cloudnode.Newsletter
A newsletter that you can subscribe to
id
string
The unique identifier for this newslettername
string
The name of this newsletterdata
Record<string, NewsletterData>
Additional data that is required to subscribe to this newsletterCloudnode.NewsletterData
A data field that is required to subscribe to this newsletter
name
string
The name of the fielddescription
string | undefined
Description of the fieldtype
"string" | "number" | "boolean"
The type of datarequired
boolean
Whether this field is requiredCloudnode.NewsletterSubscription
Your subscription to a newsletter
id
string
The ID of the subscription. Can be used to unsubscribe.email
string
The email address of the subscribernewsletter
string
The ID of the newsletter that was subscribed toCloudnode.Options
API client options
baseUrl
string
The base URL of the APIautoRetry
boolean
Whether to automatically retry requests that fail temporarily.
If enabled, when a request fails due to a temporary error, such as a rate limit, the request will be retried after the specified delay.maxRetryDelay
number
The maximum number of seconds that is acceptable to wait before retrying a failed request.
This requires autoRetry
to be enabled.maxRetries
number
The maximum number of times to retry a failed request.
This requires autoRetry
to be enabled.Cloudnode.PaginatedData<T>
Paginated response
items
T[]
The page itemstotal
number
The total number of itemslimit
number
The number of items per pagepage
number
The current page numberCloudnode.PartialToken
A token, however, the permissions
field is not included
id
string
The ID or key of the tokencreated
Date
Date and time when this token was createdexpires
Date | null
Date and time when this token expires. Null if it never expires.internal
string | undefined
Whether this token is for internal use only, e.g. to power a session. In other words, an internal token is one that was not created by the client.metadata
Cloudnode.TokenMetadata
Additional metadata about this tokenCloudnode.Permission
A permission node
permission
string
The permission node stringdescription
string
User-friendly description of the permission nodenote
string | null
Additional user-friendly information about the permission nodegroup
string | null
A group/category title that can be used to group permissions togetherCloudnode.PrimaryEmail
Your current primary account e-mail address
id
string
The ID of the e-mail addressaddress
string | null
Your primary e-mail address. May ben null if anonymised.verified
boolean
Whether this e-mail address has been verifiedCloudnode.Project
An isolated group of servers
id
string
The ID of the projectname
string
Project nameuser
string
ID of the user that owns this projectCloudnode.Request
A request
id
string
The ID of the requestmethod
string
The request method (e.g. GET, POST, HEAD, etc.scheme
"http" | "https"
The URL schemehost
string
The requested host nameurl
string
The request URL pathstatus
number
The HTTP status code that was returned to this requestip
string
The IP address of the client that made the request (can be both IPv4 and IPv6)date
Date
The time when the request was receivedresponseTime
number
The time in milliseconds that the request took to processhasEvents
boolean
Whether any server-side error events occurred while processing this requestrequestHeaders
Record<string, string> | null
The request headers that were receivedrequestBody
string | null
The request body that was received (likely parsed and formatted as JSON)responseHeaders
Record<string, string> | null
The headers that were returned by the serverresponseBody
{type: "Buffer", data: number[]} | null
The response body that was returned by the server in response to this requestCloudnode.ShortRequest
Overview of a request
id
string
The ID of the requestmethod
string
The request method (e.g. GET, POST, HEAD, etc.scheme
"http" | "https"
The URL schemehost
string
The requested host nameurl
string
The request URL pathstatus
number
The HTTP status code that was returned to this requestip
string
The IP address of the client that made the request (can be both IPv4 and IPv6)date
Date
The time when the request was receivedresponseTime
number
The time in milliseconds that the request took to processhasEvents
boolean
Whether any server-side error events occurred while processing this requestCloudnode.Token
An authentication token
id
string
The ID or key of the tokencreated
Date
Date and time when this token was createdexpires
Date | null
Date and time when this token expires. Null if it never expires.permissions
string[]
Permission scopes that this token holdsinternal
string | undefined
Whether this token is for internal use only, e.g. to power a session. In other words, an internal token is one that was not created by the client.metadata
Cloudnode.TokenMetadata
Additional metadata about this tokenCloudnode.TokenMetadata
Token metadata
FAQs
A client library for the Cloudnode API, written in TypeScript. [Documentation](https://github.com/cloudnode-pro/ts-client#documentation)
The npm package cloudnode-ts receives a total of 5 weekly downloads. As such, cloudnode-ts popularity was classified as not popular.
We found that cloudnode-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.