You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change account password. Requires token with scope `account.details.password.update`.
203
203
204
204
-`currentPassword` <code>[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)</code> Your current password.
205
205
-`newPassword` <code>[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)</code> The new password. Must be at least 15 characters, or 8 characters if it contains a mix of letters, numbers and symbols.
@@ -215,7 +215,7 @@ Change account password
215
215
216
216
### `cloudnode.account.get()`
217
217
218
-
Get account details
218
+
Get account details. Requires token with scope `account.details`.
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.
276
+
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`.
Replace account identity. Requires token with scope `account.details.identity.update`.
291
291
292
292
-`username` <code>[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)</code> Your unique username. Between 3 and 64 characters. Only letters, numbers, dashes and underscores. May not start with `user_`.
293
293
-`name` <code>[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [null](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/null)</code> Your full name. Set to `null` to remove.
@@ -305,7 +305,7 @@ Replace account identity
305
305
306
306
### `cloudnode.account.setEmail(email)`
307
307
308
-
Set your primary e-mail address
308
+
Set your primary e-mail address. Requires token with scope `account.details.email.update`.
309
309
310
310
-`email` <code>[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)</code> E-mail address to set as primary.
Update account identity. Requires token with scope `account.details.identity.update`.
325
325
326
326
-`username` <code>[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)</code> Your unique username. Between 3 and 64 characters. Only letters, numbers, dashes and underscores. May not start with `user_`.
327
327
-`name` <code>[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [null](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/null)</code> Your full name. Set to `null` to remove.
List subscriptions of the authenticated user. Requires token with scope `newsletter.subscriptions.list.own`.
421
421
422
422
-`limit` <code>[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)</code> The number of subscriptions to return per page. No more than 50. Default: `10`
423
423
-`page` <code>[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)</code> The page number. No more than 2³² (4294967296). Default: `1`
@@ -446,7 +446,7 @@ Revoke a subscription (unsubscribe)
Create token. Requires token with scope `tokens.create.own`.
450
450
451
451
-`permissions` <code>[string[]](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)</code> List of permissions to grant to the token. You must already have each of these permissions with your current token.
452
452
-`lifetime` <code>[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)</code> Lifetime of the token in seconds. If null, the token will never expire (not recommended). Max: 31560000 (1 year). Min: 60 (1 minute).
@@ -463,7 +463,7 @@ Create token
463
463
464
464
### `cloudnode.token.get(id)`
465
465
466
-
Get token details
466
+
Get token details. Requires token with scope `tokens.get.own`.
467
467
468
468
-`id` <code>string | "current"</code> The ID of the token to get. Specify `current` to get information about the token that was used to authenticate the request.
Get a recent request by ID. Requires token with scope `tokens.get.own.requests`.
483
483
484
484
-`id` <code>string | "current"</code> The ID of the token. Specify `current` to get information about the token that was used to authenticate the request.
485
485
-`request` <code>[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)</code> The ID of the request.
List tokens of user. Requires token with scope `tokens.list.own`.
500
500
501
501
-`limit` <code>[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)</code> The number of tokens to return per page. No more than 50. Default: `10`
502
502
-`page` <code>[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)</code> The page number. No more than 2³² (4294967296). Default: `1`
Get list of recent requests made with the token. Requires token with scope `tokens.get.own.requests`.
516
516
517
517
-`id` <code>string | "current"</code> The ID of the token. Specify `current` to get information about the token that was used to authenticate the request.
518
518
-`limit` <code>[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)</code> The number of requests to return per page. No more than 50. Default: `10`
@@ -530,7 +530,7 @@ Get list of recent requests made with the token
530
530
531
531
### `cloudnode.token.revoke(id)`
532
532
533
-
Revoke token
533
+
Revoke token. Requires token with scope `tokens.revoke.own`.
534
534
535
535
-`id` <code>string | "current"</code> The ID of the token to revoke. Specify `current` to revoke the token that was used to authenticate the request.
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.
550
+
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`.
Copy file name to clipboardExpand all lines: browser/Cloudnode.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -422,7 +422,7 @@ class Cloudnode {
422
422
* @returns Session token. Also returned in `Set-Cookie` header.
423
423
*/
424
424
register: async(username,email,password)=>{
425
-
returnawaitthis.#sendRequest({"type": "operation","description": "Create an account and session. After signing up, a welcome e-mail is sent to confirm your e-mail address.\n\n> **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.","method": "POST","path": "/auth/register","parameters": {"body": {"username": {"description": "The username to use for the account. Must be between 3 and 32 characters long. Cannot start with `user_`. May contain only letters, numbers, dashes and underscores. Must be unique.","type": "string","required": true},"email": {"description": "The e-mail address to register. A valid unique non-disposable e-mail that can receive mail is required.","type": "string","required": true},"password": {"description": "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.","type": "string","required": true}}},"returns": [{"status": 201,"type": "{session: string}","description": "Session token. Also returned in `Set-Cookie` header."},{"status": 422,"type": "Error & {code: \"INVALID_DATA\"}"},{"status": 403,"type": "Error & {code: \"IP_REJECTED\"}"},{"status": 429,"type": "Error & {code: \"RATE_LIMITED\"}"},{"status": 500,"type": "Error & {code: \"INTERNAL_SERVER_ERROR\"}"},{"status": 503,"type": "Error & {code: \"MAINTENANCE\"}"}]},{},{},{ username, email, password });
425
+
returnawaitthis.#sendRequest({"type": "operation","description": "Create an account and session. After signing up, a welcome e-mail is sent to confirm your e-mail address.\n\n> **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.","method": "POST","path": "/auth/register","token": null,"parameters": {"body": {"username": {"description": "The username to use for the account. Must be between 3 and 32 characters long. Cannot start with `user_`. May contain only letters, numbers, dashes and underscores. Must be unique.","type": "string","required": true},"email": {"description": "The e-mail address to register. A valid unique non-disposable e-mail that can receive mail is required.","type": "string","required": true},"password": {"description": "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.","type": "string","required": true}}},"returns": [{"status": 201,"type": "{session: string}","description": "Session token. Also returned in `Set-Cookie` header."},{"status": 422,"type": "Error & {code: \"INVALID_DATA\"}"},{"status": 403,"type": "Error & {code: \"IP_REJECTED\"}"},{"status": 429,"type": "Error & {code: \"RATE_LIMITED\"}"},{"status": 500,"type": "Error & {code: \"INTERNAL_SERVER_ERROR\"}"},{"status": 503,"type": "Error & {code: \"MAINTENANCE\"}"}]},{},{},{ username, email, password });
426
426
},
427
427
/**
428
428
* Create a session using user ID/username/e-mail and password.
@@ -439,7 +439,7 @@ class Cloudnode {
439
439
* @returns Session token. Also returned in `Set-Cookie` header.
440
440
*/
441
441
login: async(user,password)=>{
442
-
returnawaitthis.#sendRequest({"type": "operation","description": "Create a session using user ID/username/e-mail and password.\n\n> **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.","method": "POST","path": "/auth/login","parameters": {"body": {"user": {"description": "User ID (starts with `user_`), username or e-mail address.","type": "string","required": true},"password": {"description": "The password of the account.","type": "string","required": true}}},"returns": [{"status": 201,"type": "{session: string}","description": "Session token. Also returned in `Set-Cookie` header."},{"status": 422,"type": "Error & {code: \"INVALID_DATA\"}"},{"status": 403,"type": "Error & {code: \"IP_REJECTED\"}"},{"status": 429,"type": "Error & {code: \"RATE_LIMITED\"}"},{"status": 500,"type": "Error & {code: \"INTERNAL_SERVER_ERROR\"}"},{"status": 503,"type": "Error & {code: \"MAINTENANCE\"}"}]},{},{},{ user, password });
442
+
returnawaitthis.#sendRequest({"type": "operation","description": "Create a session using user ID/username/e-mail and password.\n\n> **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.","method": "POST","path": "/auth/login","token": null,"parameters": {"body": {"user": {"description": "User ID (starts with `user_`), username or e-mail address.","type": "string","required": true},"password": {"description": "The password of the account.","type": "string","required": true}}},"returns": [{"status": 201,"type": "{session: string}","description": "Session token. Also returned in `Set-Cookie` header."},{"status": 422,"type": "Error & {code: \"INVALID_DATA\"}"},{"status": 403,"type": "Error & {code: \"IP_REJECTED\"}"},{"status": 429,"type": "Error & {code: \"RATE_LIMITED\"}"},{"status": 500,"type": "Error & {code: \"INTERNAL_SERVER_ERROR\"}"},{"status": 503,"type": "Error & {code: \"MAINTENANCE\"}"}]},{},{},{ user, password });
Copy file name to clipboardExpand all lines: schema.json
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -898,6 +898,7 @@
898
898
"description": "Create an account and session. After signing up, a welcome e-mail is sent to confirm your e-mail address.\n\n> **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.",
899
899
"method": "POST",
900
900
"path": "/auth/register",
901
+
"token": null,
901
902
"parameters": {
902
903
"body": {
903
904
"username": {
@@ -938,6 +939,7 @@
938
939
"description": "Create a session using user ID/username/e-mail and password.\n\n> **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.",
0 commit comments