SignalWire Developer’s Portal

Integrate SignalWire in your Instance

// Set up a video call in 8 lines of code!

import { Video } from '@signalwire/js'

const roomSession = new Video.RoomSession({
  token: '<MyToken>',
  rootElement: document.getElementById('root'),
  audio: true,
  video: true
})

await roomSession.join()
// Set up a video call in 8 lines of code!
			  
import { Video } from '@signalwire/realtime-api'

const video = new Video.Client({
  project: '<project-id>',
  token: '<project-token>'
})

video.on('room.started', (room) => {
  console.log("Room started:", room.displayName)
});

Our Products

Learn how to get started with tailored guides and examples.

  • Video

    Fully customizable audio/ video conferencing apps

  • Messaging

    Send and receive SMSs

  • Chat

    Provide seamless chat functionality to the browser

  • Voice

    Dial phone numbers or answer phone calls

Our APIs and SDKs

Go straight to the technical reference you are looking for.

RELAY Browser SDK

The RELAY Browser SDK transforms your standard browser into a realtime media engine, enabling developers to directly make audio and video calls to other browsers.

const roomSession = new SignalWire.Video.RoomSession({
  token: '<YourJWT>',
  rootElement: document.getElementById('myRoot'), // an html element to display the video,
  audio: true,
  video: true,
})

try {
  await roomSession.join();
} catch (error) {
  console.error('Error', error)
}
const roomSession = new SignalWire.Video.RoomSession({
  token: '<YourJWT>',
  rootElement: document.getElementById('myRoot'), // an html element to display the video,
  audio: true,
  video: true,
})

roomSession.join().then(() => {
  // Use roomSession ...
}).catch(error => {
  console.error('Error', error)
})

RELAY REST APIs

Use our RELAY REST APIs to create, list, update, or delete your SignalWire Resources (video rooms, phone numbers, access tokens, etc).

curl --request GET \
     --url https://example.signalwire.com/api/video/rooms \
     --header 'Accept: application/json' \
     --header 'Authorization: Basic ZGVtbzpkZW1v'
const fetch = require('node-fetch');  // npm install node-fetch --save

const url = 'https://example.signalwire.com/api/video/rooms';
const options = {
  method: 'GET',
  headers: {Accept: 'application/json', Authorization: 'Basic ZGVtbzpkZW1v'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));

RELAY Realtime SDK

Use the RELAY Realtime SDK to receive events from resources (phone calls, video rooms, chat channels) and control them server-side (mute users, start recordings, change layouts, transfer calls, etc).

import { Video } from '@signalwire/realtime-api'

const video = new Video.Client({
  project: '<project-id>',
  token: '<project-token>'
})

video.on('room.started', (roomSession) => {
  console.log("Room started")

  roomSession.on('member.joined', (member) => {
    console.log(member)
  })
});

Compatibility APIs (REST, XML)

Ease the transition from other providers using a familiar and compatible interface. Use the REST interface for handling phone numbers, messages, faxes, recordings, and more. Or, use the XML interface for programming how your phone numbers should answer phone calls or messages.

curl --request GET \
     --url https://example.signalwire.com/api/laml/2010-04-01/Accounts/506cea33-eb47-4b56-82b0-d3c5afaf39d4/Calls \
     --header 'Accept: application/json' \
     --header 'Authorization: Basic dGVzdDp0ZXN0'
<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say>Welcome to SignalWire!</Say>
</Response>

RELAY SDKs

You can use our RELAY technology from a large number of SDKs, each for a different programming language. Not using JavaScript? Explore our SDKs for .NET, Go, Ruby, Python, PHP, and other languages.

using SignalWire.Relay;
using SignalWire.Relay.Calling;
using System;
using System.Collections.Generic;

namespace Example
{
    class ExampleConsumer : Consumer
    {
        protected override void Setup()
        {
            Project = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
            Token = "PTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
            Contexts = new List<string> { "test" };
        }

        protected override void OnIncomingCall(Call call)
        {
            AnswerResult resultAnswer = call.Answer();
            if (!resultAnswer.Successful) return;

            call.PlayTTS("Welcome to SignalWire!");

            call.Hangup();
        }
    }

    class Program
    {
        public static void Main()
        {
            new ExampleConsumer().Run();
        }
    }
}
require "signalwire"

class MyConsumer < Signalwire::Relay::Consumer
  contexts ['incoming']

  def on_incoming_call(call)
    call.answer
    call.play_tts 'the quick brown fox jumps over the lazy dog'
    call.hangup
  end
end

MyConsumer.new.run

from signalwire.relay.consumer import Consumer

class CustomConsumer(Consumer):
  def setup(self):
    self.project = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
    self.token = 'PTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
    self.contexts = ['home', 'office']

  async def ready(self):
    # Consumer is successfully connected with Relay.
    # You can make calls or send messages here..

  async def on_incoming_call(self, call):
    result = await call.answer()
    if result.successful:
      print('Call answered..')

# Run your consumer..
consumer = CustomConsumer()
consumer.run()
<?php

require dirname(__FILE__) . '/vendor/autoload.php';

use Generator as Coroutine;
use SignalWire\Relay\Consumer;

class CustomConsumer extends Consumer {
  public $project = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX';
  public $token = 'PTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
  public $contexts = ['home', 'office'];

  public function ready(): Coroutine {
    yield;
    // Consumer is successfully connected with Relay.
    // You can make calls or send messages here..
  }

  public function onIncomingCall($call): Coroutine {
    $result = yield $call->answer();
    if ($result->isSuccessful()) {
      yield $call->playTTS(['text' => 'Welcome to SignalWire!']);
    }
  }
}

$consumer = new CustomConsumer();
$consumer->run();

What would you like to build today?

  • Two Factor Authentication

    This guide will show you how to implement basic two factor authentication via a voice call.

  • Embed video on your website

    Learn the basics of SignalWire Video APIs with this JavaScript-based sample web-app.

  • Send SMS from the Browser

    Use Python and Flask to create a web application that can send SMS through the browser.

Join us!

Find the answers you’re looking for in our community

  • Slack Community

    +5k Users

    Join
  • GitHub Organization

    +50 Repositories

    Join