Table of Contents

Class Rtc

Namespace
Vonage.Applications.Capabilities
Assembly
Vonage.dll

Represents the RTC (Real-Time Communication) capability for an application. Configures webhooks for Client SDK events.

public class Rtc : Capability
Inheritance
Rtc
Inherited Members

Constructors

Rtc()

Initializes a new instance of the Rtc class.

public Rtc()

Rtc(IDictionary<Type, Webhook>)

Initializes a new instance of the Rtc class with the specified webhooks.

public Rtc(IDictionary<Webhook.Type, Webhook> webhooks)

Parameters

webhooks IDictionary<Webhook.Type, Webhook>

The webhook configuration dictionary.

Properties

SignedCallbacks

Whether to use signed webhooks. This verifies that webhook requests are coming from Vonage.

[JsonProperty("signed_callbacks", Order = 0)]
public bool SignedCallbacks { get; set; }

Property Value

bool

Methods

Build()

Creates a new RTC capability builder for fluent configuration.

public static Rtc Build()

Returns

Rtc

A new RTC capability instance.

Examples

var rtcCapability = Rtc.Build()
    .WithEventUrl("https://example.com/webhooks/event", WebhookHttpMethod.Post)
    .EnableSignedCallbacks();

DisableSignedCallbacks()

Disables signed callbacks.

public Rtc DisableSignedCallbacks()

Returns

Rtc

The RTC capability instance for fluent chaining.

Examples

var rtc = Rtc.Build()
    .DisableSignedCallbacks();

EnableSignedCallbacks()

Enables signed callbacks to verify webhook requests are from Vonage.

public Rtc EnableSignedCallbacks()

Returns

Rtc

The RTC capability instance for fluent chaining.

Examples

var rtc = Rtc.Build()
    .WithEventUrl("https://example.com/webhooks/event", WebhookHttpMethod.Post)
    .EnableSignedCallbacks();

WithEventUrl(string, WebhookHttpMethod)

Sets the event URL webhook. Vonage will send RTC events to this URL.

public Rtc WithEventUrl(string url, WebhookHttpMethod method)

Parameters

url string

The webhook URL that will receive RTC events.

method WebhookHttpMethod

The HTTP method (GET or POST).

Returns

Rtc

The RTC capability instance for fluent chaining.

Examples

var rtc = Rtc.Build()
    .WithEventUrl("https://example.com/webhooks/event", WebhookHttpMethod.Post);