Best Ever Chat Docs

Is very important

4. Endpoints

GET on these endpoints generally returns to you a static webpage, POST does some stuff but often rediects to another static page. There's not a lot of REST going on here.

A. Unauthenticated Endpoints

/register
GET - returns the static registration page
POST - this one registers new parasites. Give it "parasite", "password", "password2", "email" as form-data. valid values for "parasite" are not an existing parasite id AND not a current parasite display name (see Section 2.A). all of them are required.
/login
GET - returns the static login page
POST - this one logs in a parasite. Give it "parasite" and "password" as form-data, or use JSON with Content-Type header set as below
Request
Content-Type: application/json
{
    "parasite": "butt",
    "password": "Facefoot123!"
}

Response
Cookie: parasite="<your token>"
{
    "success": true,
    "cookie name": "parasite"
}
                    
/logout
GET - this one makes the parasite not authenticated anymore, then redirects to /login
/forgot_password
GET - returns the static password reset request page so a parasite can input their username and get a password reset email.
POST - this one triggers the forgot password email, which will include a link to the GET for this endpoint with the correct token. send "parasite" as form-data. redirects to /login
/reset_password
GET - returns the static password reset page. query param "token" is required
POST - this one actually does the password reset. send "token", "password", "password2" as form-data. redirects to /login
/reactivate
GET - returns the static reactivate request page. the parasite must know their username.
POST - sends the reactivation request to the admin email defined in chat.cfg. reactivation must be done through the web client admin tools by a parasite with admin permissions. redirects to /login on success
/emoji_search
GET - lets you search for a keyword in the available emojis by shortcode with a keyword. it should probably be authenticated? but it isn't. requires query param "search", returns json with matching unicode characters as "result"
Response
{
    "search": "horse",
    "result": [
        "\ud83c\udfc7",
        "\ud83c\udfc7\ud83c\udfff",
        "\ud83c\udfc7\ud83c\udffe",
        "\ud83d\udc34",
        "\ud83c\udfc7\ud83c\udffc",
        "\ud83c\udfc7\ud83c\udffd",
        "\ud83d\udc0e",
        "\ud83c\udfa0",
        "\ud83c\udfc7\ud83c\udffb"
    ]
}
                    

B. Authenticated Endpoints

/
GET - this is the main web site with the web client
/m
GET - this is the mobile web site with the mobile web client
/validate_username
POST - Give it "set_name" as form-data. this checks if a username is valid when changing it. a valid name is not an existing parasite id AND is not a current parasite display name (see Section 2.A). returns only JSON true or false