//retrieve text info // private static async Task SendMessage(string to, string from, string text, string textId, string textToken, string textSecret) { var data = new Bandwidth.Net.Api.MessageData { To = to, // number receiving text essage From = from, //bandwidth number Text = text // reminder }; Console.WriteLine("Text ID = " + textId); Console.WriteLine("Text Token = " + textToken); Console.WriteLine("Text Secret = " + textSecret); Console.WriteLine("Text From = " + from); Console.WriteLine("We are before the var client command"); var client = new Client(textId, textToken, textSecret); Console.WriteLine("We are after the var client command"); Console.WriteLine("We are before the var message command"); var message = await client.Message.SendAsync(data); Console.WriteLine("We are after the var message command"); }
public Task <string> SendAsync(MessageData data, CancellationToken?cancellationToken = null) { return(Client.MakePostJsonRequestAsync($"/users/{Client.UserId}/messages", cancellationToken, data)); }