Make a Video Call with REST API

Rest API Integration Architecture

The easiest way to access Kaleyra video calls is through the REST API. The following diagram represents a basic integration flow and the section following the diagram elaborates on the flow:

1. Create Room

A back-end service calls the API, POST /room/create, including the user IDs of the required participants in the request payload.

To view the API reference, see Create Room.

Here is an example for your reference:

{
    "participants": [{"user_id": "user_xxx",
        "is_admin": true }, {"user_id": "user_yyy", "tools": {"chat":true}}],
    "description": "A textual description of the room created"
}

The response contains the links to access the room that has just been created. Each participant is assigned a different link, contained in the URL parameter.

{
    "room": {
        "room_id": "room_xyz",
        ...,
        "user_urls": [
            {
                "user": "usr_xxx",
                "url": "https://sandbox.bandyer.com/connect/direct-rest-call-handler/aaaaaaaaaa",
                "tools": {
                    ...
                    },
                "is_admin": true
            },
            {
                "user": "usr_yyy",
                "url": "https://sandbox.bandyer.com/connect/direct-rest-call-handler/bbbbbbbbbb",
                "tools": {
                    ...
                    },
                "is_admin": false
            }
        ]
    }
}

2. Send Room Links

The links can be shared with participants in many ways, for example via email, SMS, or WhatsApp.

3. Join Room

By clicking the link users can join the room from their own browsers.