Created
October 27, 2016 17:50
-
-
Save dtolb/1adf61865b982d763ef5ef06d26fa82c to your computer and use it in GitHub Desktop.
woo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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