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
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 });
0 commit comments