Skip to content

Instantly share code, notes, and snippets.

@dtolb
Created October 27, 2016 17:50
Show Gist options
  • Select an option

  • Save dtolb/1adf61865b982d763ef5ef06d26fa82c to your computer and use it in GitHub Desktop.

Select an option

Save dtolb/1adf61865b982d763ef5ef06d26fa82c to your computer and use it in GitHub Desktop.
woo
using System;
using System.Linq;
using System.Threading.Tasks;
using Bandwidth.Net;
using Bandwidth.Net.Api;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
try
{
SendMessage().Wait();
}
catch (Exception ex)
{
Console.Error.WriteLine(ex.Message);
}
}
private static async Task SendMessage()
{
var data = new Bandwidth.Net.Api.MessageData
{
To = "+19197891146",
From = "+17043369523",
Text = "Hi from C#"
};
var client = new Client(
"u-",
"t-",
"j5rswsasdfry"
);
var message = await client.Message.SendAsync(data);
Console.WriteLine(message.Id);
var messages = client.Message.List();
Console.WriteLine(messages.First().Text);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment