That's simple (very simple) comunicator to send text messages. It's writen in python and using Bottle library.
TexturedComunicator have hosted instance on https://chat.texturedpolak.xyz .
Hosted instance is protected with end-to-end TLS encryption and is protected with Cloudflare.
For all requests is one URL:
- for hosted instance: https://chat.texturedpolak.xyz/api
- for self-hosted: your_ip_or_domain/api
METHOD: POST
Content Type: application/x-www-form-urlencoded
Payload: {id: your_last_message_id (int)}
Response: {reload: true/false}
METHOD: PATCH
Content Type: application/json
Payload: {lastId: your_last_message_id(int or str), passwordHash: your_password_hash(str), username: your_username(str), html: true/false (bool)}
Response:
- if
html: true
:
{lastId: latest_message_id(int), messages: all_new_messages_in_html_secure_format(str)}
- if
html: false
:
{lastId: latest_messages_id(int), messages: [{username: username str), message: one_message(str), id: one_message_id(int)},...]}
METHOD: PUT
Content Type: application/json
Payload: {message: message_to_send(str), passwordHash: your_password_hash (str), username: your_username (str)}
Response: No Response, only Status Code