Welcome

Send feedback info about calls

URL Requires Auth HTTP Method
/api/v1/voice.call yes POST

Payload

Argument Example Required Description
roomUrl https://pimenta.live/
pimentagroup
xwuxNjkzT2fAy7JCB
tpxGjMs3taDcJzaCf
Required The URL of pimenta.live that will be the call
senderName Gabriel Morais Required The name of user that make the call
senderGroup pimentaGROUP Optional The name of the group where user make the call
serverName chat.pimentagroup.de Required The URL of server that is used to make the call
notificationMessage Incoming Call Required The message to be sent to notification payload alert
userNames [‘gabriel.oliveira’,
‘gabriel.morais’,
‘luis.machado’]
Optional If userIds not supplied system will check for userNames parameter to determine the recipients of call
userIds [“brLK2GKKH5S7RrgM8”,
“txer9hbbdRtWieC36”]
Required This is a required parameter, but you can send userNames instead. If anyone is send, system will return a error
roomId tpxGjMs3taDcJzaCf Required This is the roomId where the call sent. All rooms, including direct message have a roomId
additionalInfo {device: ‘iPhone’} Optional This is a JSON string that can have any additional info that mobile devices wish to receive on additionalInfo key of notification payload
onlyAudio true Required Define if a call is a video or audio call
senderId ehyoM5JSQi94RwqPE7 Optional The ID of user that sent the call. The default is the user that make the call
notificationType callInvite Optional A string to identify the type of push notification. The default value is callInvite

Example Call

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     -H "Content-type:application/json" \
     http://localhost:3000/api/v1/voice.call \
     -d '{"notificationMessage":"Incoming call","onlyAudio":true,"roomUrl":"https://pimenta.live/pimentagroupxwuxNjkzT2fAy7JCBtpxGjMs3taDcJzaCf","senderName":"Gabriel Oliveira", "serverName":"https://temp-build.pimenta.chat", "userIds":["brLK2GKKH5S7RrgM8", "txer9hbbdRtWieC36"], "roomId": "tpxGjMs3taDcJzaCf"}'

Example Result

{
    "result": {
        "sentTo": {
            "brLK2GKKH5S7RrgM8": "cwWYNFVT3oU:APA91bEzrNX0dyYTltuXuIb0icZjnraHfqXVYxyppZ48VBn0i5XuArOL4AgBb-r9sreNfIudOSdLQ0F9UJ1C0ObbrejecZHJEZWIwQz6DrW7utJeTZpJOwZVXMogScy6GZ7AVmmauCYw"
        },
        "callId": "bXq5Kw9gKeCa4W9vw"
    },
    "success": true
}

About

The voice.call endpoint is used to start a call. This will send a push notification (special push for iPhone and normal push for Android) for mobile devices, and mobile apps will manage the notification to start ringing phone.

On web, there’s a special application that is listening for new PimentaCall objects that are created using this endpoint. When this happens, web will start to play a ringing tone.