Message Delivery
Messages can be dispatched in several ways using Ripplefy. Depending on your requirements, you may choose to direct messages to a specific user's session, all sessions associated with a particular user, or broadcasting to entire channels.
Sending Messages to a Specific Users Session
POST /messages
cURL
curl --location 'https://api.ripplesignal.co/messages' \
--header 'x-secret-key: {your_secret_key}' \
--header 'Content-Type: application/json' \
--data '{
"users": ["{your_userA_id}::{your_userA_session}", "{your_userB_id}::{your_userB_session}"],
"message": "{\"message\": \"some-msg\"}"
}'
Response
Status Code: 200 OK
{
"success": true
}
Sending Messages to All Sessions of Specific Users
POST /messages
cURL
curl --location 'https://api.ripplesignal.co/messages' \
--header 'x-secret-key: {your_secret_key}' \
--header 'Content-Type: application/json' \
--data '{
"users": ["{your_userA_id}", "{your_userB_id}"],
"message": "{\"message\": \"some-msg\"}"
}'
Response
Status Code: 200 OK
{
"success": true
}
Sending Messages to Channels
POST /messages
cURL
curl --location 'https://api.ripplesignal.co/messages' \
--header 'x-secret-key: {your_secret_key}' \
--header 'Content-Type: application/json' \
--data '{
"channels": ["{channelA_id}", "{channelB_id}"],
"message": "{\"message\": \"some-msg\"}"
}'
Response
Status Code: 200 OK
{
"success": true
}