-
Notifications
You must be signed in to change notification settings - Fork 0
Signup endpoint
Alvin Cheng edited this page Apr 23, 2023
·
2 revisions
This is the signup endpoint, as the name suggests the endpoint will create a user instance in the database. This endpoint will except an 'id' argument for the user id, usually created with the uuid package. A 'username' for the username, a 'password' for the user's password to be hashed and stored, a 'verified' argument for the verified status, a 'bot' argument for the bot status and a 'blocked' argument to determine if the user is blocked. Furthermore, the endpoint will return a status of '401' on an invalid API key, '201' on success or '500' on server error. finally, the source for this endpoint is stored in /src/endpoints/signup.ts
.
post("http://<URL>/api/signup?key=<YOUR_API_KEY>", {
id: "<ID>",
verified: false,
blocked: false,
bot: false,
username: "<USERNAME>",
password: "<PASSWORD>", // Must be raw unencrypted passcode!!
})
.then((res) => {
console.log(res);
})
.catch((err) => {
console.error(err);
});
- Home
- Login endpoint
- Block user endpoint
- Create room endpoint
- Delete user endpoint
- Get all rooms endpoint
- Get GIF endpoint
- Get messages endpoint
- Get public rooms endpoint
- Get user info endpoint
- Get users info endpoint (Deprecated)
- Join room endpoint
- Signup endpoint
- Report room endpoint
- Remove room endpoint
- Update description endpoint
- Follow user endpoint
- Unfollow user endpoint
- Update icon color endpoint
- Upload content endpoint
- Upload content endpoint (Deprecated)
- Verify client endpoint
- Upload token endpoint
- Chill&chat websockets
- Message socket
- Keyboard socket
- Delete message socket
- User content
- Final words&thoughts
- Run API