Using this guide, you can set up a development environment in five minutes to trigger a PHLO.
To get started, install and set up .NET Framework 4.6 or higher and Plivo’s .NET SDK.
Operating System | Instructions |
---|---|
macOS and Linux | To see if you already have .NET Framework installed, run the command dotnet --version in a terminal window. If you don’t have it, download and install it. |
Windows | To install .NET Framework on Windows, follow these instructions. |
To install the Plivo .NET SDK:
Create and configure a PHLO, then integrate the PHLO into your application workflow by making an API request to trigger the PHLO with the required payload.
You can run a PHLO with static payload values by entering specific values in fields like from and to on the PHLO console.
To deliver a dynamic payload instead of a static one, define the payload keys as Liquid templates on the PHLO console and pass the values at runtime.
To trigger a PHLO, open the Program.cs file in the CS project and paste into it the code below for either a static or dynamic payload.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Collections.Generic;
using Plivo;
namespace test_PHLO
{
class Program
{
public static void Main(string[] args)
{
var phloClient = new PhloApi("<auth_id>", "<auth_token>");
var phloID = "<phlo_id>";
var phlo = phloClient.Phlo.Get(phloID);
var data = new Dictionary<string, object>
{
{ "from", "<Caller_ID>" },
{ "to", "<Destination_Number>" }
};
Console.WriteLine(phlo.Run(data));
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using System;
using Plivo;
namespace test_PHLO
{
class Program
{
public static void Main(string[] args)
{
var phloClient = new PhloApi("<auth_id>", "<auth_token>");
var phloID = "<phlo_id>";
var phlo = phloClient.Phlo.Get(phloID);
Console.WriteLine(phlo.Run());
}
}
}
Save the file and run the code from the Visual Studio IDE.