-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathSendCustomSMS.cs
More file actions
34 lines (29 loc) · 1.07 KB
/
SendCustomSMS.cs
File metadata and controls
34 lines (29 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Collections.Generic;
using Telesign;
namespace TelesignEnterprise.Example.VerifySms
{
class SendCustomSMS
{
static void Main(string[] args)
{
string customerId = "FFFFFFFF-EEEE-DDDD-1234-AB1234567890";
string apiKey = "EXAMPLETE8sTgg45yusumoN6BYsBVkh+yRJ5czgsnCehZaOYldPJdmFh6NeX8kunZ2zU1YWaUw/0wV6xfw==";
string phoneNumber = "phone_number";
string template = "Your Widgets 'n' More verification code is $$CODE$$.";
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters["template"] = template;
try
{
VerifyClient verifyClient = new VerifyClient(customerId, apiKey);
RestClient.TelesignResponse telesignResponse = verifyClient.Sms(phoneNumber, parameters);
}
catch (Exception e)
{
Console.WriteLine(e);
}
Console.WriteLine("Press any key to quit.");
Console.ReadKey();
}
}
}