The Plivo .NET SDK makes it simpler to integrate communications into your .NET applications using the Plivo REST APIs. Using the SDK, you’ll be able to make voice calls, send SMS messages, and generate Plivo XML documents to control your call flows.Supported .NET versions: This SDK was written targeting at .NET Standard 1.3, and thus works with .NET Framework 4.6 and higher and .NET Core 1.0 and higher. Check here to know about all the other supported platforms.
To make the API requests, you need to create a PlivoApi instance and provide it with authentication credentials, which you can find on the Overview page of the Plivo console.
Copy
Ask AI
var api = new PlivoApi("<auth_id>","<auth_token>");
Replace the auth placeholders with your authentication credentials from the Plivo console.
Using api.Resource.List() lists the first 20 resources by default (the first page, with limit as 20, and offset as 0). Use limit and offset to get more pages of resources.
internal class Program{ public static void Main(string[] args) { var api = new PlivoApi("<auth_id>","<auth_token>"); var response = api.Message.Create( src:"<source_number>", dst:"<destination_number>", text:"Hello, world!" ); Console.WriteLine(response); }}
Replace the auth placeholders with your authentication credentials from the Plivo console. Replace the phone number placeholders with actual phone numbers in E.164 format (for example, +12025551234).
internal class Program{ public static void Main(string[] args) { var api = new PlivoApi("<auth_id>","<auth_token>"); var response = api.Call.Create( to:new List<String>{"<destination_number>"}, from:"<caller_id>", answerMethod:"GET", answerUrl:"https://<answer.url>" ); Console.WriteLine(response); }}