Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 980 Bytes

File metadata and controls

38 lines (30 loc) · 980 Bytes

csharp-bandwidth

Build status

.Net library for Catapult API

Usage

Using REST client

  using (var client = new Client(Config.UserId, Config.ApiToken, Config.Secret))
  {
      var applications = await client.Applications.GetAll(); //Get all applications of user

      //making call
      var callId = await client.Calls.Create(new Call
      {
          From = "+1-202-555-0149",
          To = "+1-202-555-0148"
      });

      //sending sms
      var smsId = await client.Messages.Send(new Message
      {
          From = "+1-202-555-0149",
          To = "+1-202-555-0148",
          Text = "Hello"
      });
  }

See Bandwidth Catapult Api Docs for more details

Parsing callback events

//in request handler
var event = Bandwidth.Net.Events.Event.ParseRequestBody(requestBody);