-
Notifications
You must be signed in to change notification settings - Fork 0
introduction
This is a Web Socket and REST based api. It will be used as a second backend for my electron.js chat app and it will interact with the PostgreSQL database. Most of the processing of data, messages, authentication and more will be handled here remotely and securely.
Most endpoints will return and accept an application/json
type of input for POST and some query parameters.
Also most endpoints will require Authentication/Authorization with OAuth JWT bearer tokens.
For each endpoint I will include the type of, and what data you will need to use for the request, an example response, if the endpoint it requires authentication, rate limits and more additional information you might need when using it. I will also try to include a link to try out the endpoint.
Format for example parameters/arguments:
Another thing to note is that if I say something like [username]
you need to replace the username with your actual username. If a parameter/argument is wrapped with angled brackets (<argument>
) that means that it is required. If it is optional it will be wrapped in square brackets ([argument]
)
Example requests will be shown in curl
This is the base url for all requests:
https://chatapi.fusionsid.xyz/
In most examples I will include only the part after the base url.
Example: If I write /api/user/me
, The full URL will be at https://chatapi.fusionsid.xyz/api/user/me
Encryption
All services and protocols (REST & WebSocket) within the API are using HTTPS and WSS which has TLS (Transport Layer Security) encryption.
Additional Cloudflare Security
I also use Cloudflare as a middle man for requests. This helps with caching, security because they have functions for that, analytics and more