
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
@chat21/chat21-http-server
Advanced tools
🚀 Do you want to install Tiledesk on your server with just one click?
Use Docker Compose Tiledesk installation guide
Chat21 native REST API server
Below are described the REST API of Chat21
Before using these APIs you need an authentication JWT token
Coming soon
== Send a Message ==
curl --location --request POST 'http://localhost:8004/api/APP_ID/messages' \
--header 'Authorization: JWT-TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"sender_fullname": "SENDER FULLNAME",
"recipient_id": "RECIPIENT-UUID",
"recipient_fullname": "RECIPIENT FULLNAME",
"text": "hello",
"type": "text",
"channel_type": "direct"
}'
Where :
Create a chat user's group making the following POST call :
curl -X POST \
-H 'Content-Type: application/json' \
-H "Authorization: JWT-TOKEN" \
-d '{"group_name": "<GROUP_NAME>", "group_members": {"<MEMBER_ID>":1}}' \
'http://localhost:8004/api/<APP_ID>/groups'
Where:
With this API the user can join (become a member) of an existing group:
curl -X POST \
-H 'Content-Type: application/json' \
-H "Authorization: JWT-TOKEN" \
-d '{"member_id": "<MEMBER_ID>"}' \
'http://localhost:8004/api/<APP_ID>/groups/<GROUP_ID>/members'
Where :
With this API the user can leave an existing group:
curl -X DELETE \
-H 'Content-Type: application/json' \
-H "Authorization: JWT-TOKEN" \
-d '{"member_id": "<MEMBER_ID>"}' \
'http://localhost:8004/api/<APP_ID>/groups/<GROUP_ID>/members/<MEMBERID'
Where :
With this API you can set the group members
curl -X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: JWT-TOKEN" \
-d '{"members": {"<member_id1>":1},{"<member_id2>":1}}' \
'http://localhost:8004/api/<APP_ID>/groups/<GROUP_ID>/members'
Where :
Archive or delete a conversation from the personal timeline specified by a RECIPIENT_ID
curl -X DELETE \
-H 'Content-Type: application/json' \
-H "Authorization: JWT-TOKEN" \
http://localhost:8004/api/<APP_ID>/conversations/<RECIPIENT_ID>?delete=<BOOLEAN_VALUE>
Where :
build -t chat21/chat21-http-server:latest .
docker run chat21/chat21-server:latest
docker push chat21/chat21-http-server:latest
== Send a Message ==
curl --location --request POST 'http://localhost:8004/api/APP_ID/messages/sync?mqtt_endpoint=ws://XYZ:15675/ws&chatapi_endpoint=http://XYZ:8004/api' \
--header 'Authorization: JWT-TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"sender_fullname": "SENDER FULLNAME",
"recipient_id": "RECIPIENT-UUID",
"recipient_fullname": "RECIPIENT FULLNAME",
"text": "hello",
"type": "text",
"channel_type": "direct"
}'
Example:
curl --location --request POST 'http://localhost:8004/api/tilechat/messages/sync?mqtt_endpoint=ws://localhost:15675/ws&chatapi_endpoint=http://localhost:8004/api' --header 'Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmYmY2ODczMy1lZjRjLTQ2YmItOGU3ZS0wMWMyNWZkMDdhZGIiLCJzdWIiOiI1ZjA5OTgzZDIwZjc2YjAwMTlhZjcxOTAiLCJzY29wZSI6WyJyYWJiaXRtcS5yZWFkOiovKi9hcHBzLnRpbGVjaGF0LnVzZXJzLjVmMDk5ODNkMjBmNzZiMDAxOWFmNzE5MC4qIiwicmFiYml0bXEud3JpdGU6Ki8qL2FwcHMudGlsZWNoYXQudXNlcnMuNWYwOTk4M2QyMGY3NmIwMDE5YWY3MTkwLioiLCJyYWJiaXRtcS5jb25maWd1cmU6Ki8qLyoiXSwiY2xpZW50X2lkIjoiNWYwOTk4M2QyMGY3NmIwMDE5YWY3MTkwIiwiY2lkIjoiNWYwOTk4M2QyMGY3NmIwMDE5YWY3MTkwIiwiYXpwIjoiNWYwOTk4M2QyMGY3NmIwMDE5YWY3MTkwIiwidXNlcl9pZCI6IjVmMDk5ODNkMjBmNzZiMDAxOWFmNzE5MCIsImFwcF9pZCI6InRpbGVjaGF0IiwiaWF0IjoxNjE1Mjg2MzIxLCJleHAiOjE5MjYzMjYzMjEsImF1ZCI6WyJyYWJiaXRtcSIsIjVmMDk5ODNkMjBmNzZiMDAxOWFmNzE5MCJdLCJraWQiOiJ0aWxlZGVzay1rZXkiLCJ0aWxlZGVza19hcGlfcm9sZXMiOiJ1c2VyIn0.3Gt5_rT1lwmvV0wEoFYMedUFt25UIVbF-Qt3ufjPjQ4' --header 'Content-Type: application/json' --data-raw '{
"sender_fullname": "SENDER FULLNAME",
"recipient_id": "group-1744216774431",
"recipient_fullname": "RECIPIENT FULLNAME",
"text": "hello",
"type": "text",
"channel_type": "group"
}'
FAQs
Chat21 HTTP APIs
The npm package @chat21/chat21-http-server receives a total of 8 weekly downloads. As such, @chat21/chat21-http-server popularity was classified as not popular.
We found that @chat21/chat21-http-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.