Omnigage .NET SDK
OmnigageClient. Init ( " token-key" , " token-secret" ) ;
OmnigageClient. Init ( " token" ) ;
Call a Single Number
OmnigageClient. Init ( " token-key" , " token-secret" ) ;
var call = new CallResource
{
To = " +11115551111"
} ;
await call. Create ( ) ;
Call Two Numbers and Connect
OmnigageClient. Init ( " token-key" , " token-secret" ) ;
var call = new CallResource
{
From = " +11115550000" ,
To = " +11115551111" ,
CallerId = new CallerIdResource
{
Id = " <insert-caller-id>"
}
} ;
await call. Create ( ) ;
Send a Text Message
OmnigageClient. Init ( " token-key" , " token-secret" ) ;
var message = new TextMessageResource
{
Body = " Sample body"
} ;
await message. Create ( ) ;
var text = new TextResource
{
To = " +11115551111" ,
TextMessage = message ,
PhoneNumber = new PhoneNumberResource
{
Id = " <insert-phone-number-id>"
}
} ;
await text. Create ( ) ;
Send an Email
OmnigageClient. Init ( " token-key" , " token-secret" ) ;
var message = new EmailMessageResource
{
Subject = " Hello" ,
Body = " Sample body"
} ;
await message. Create ( ) ;
var email = new EmailResource
{
To = " [email protected] " ,
EmailMessage = message ,
EmailId = new EmailIdResource
{
Id = " <insert-email-id>"
}
} ;
await email. Create ( ) ;