Click here to Skip to main content
15,883,705 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to download csv from Twilio Messages account and save it to file on a folder(https://www.twilio.com/docs/sms/quickstart/csharp-dotnet-core) using a windows form on Button click action using System.Net.HttpWebRequest GET method request either on C# or vb.NET. I cannot figure how to implement the required authorization lines to the code.

What I have tried:

Dim AccountSid As String = "XXXXXXXXXXXXXXXXXXXXXX"
Dim AuthToken As String = "XXXXXXXXXXXXXXXXXXXXXX"
Dim client = New TwilioRestClient(AccountSid, AuthToken)
Posted
Updated 11-Jan-19 23:17pm
v2

I think that this is what you are looking for, it's an SDK specifically for Twilio.

Twilio SDK for C# and .NET - Twilio[^]

Now there is no need to worry about writing a comms wrapper for their API...
 
Share this answer
 
See the second example here: 4 Ways to Parse a JSON API with C# · GitHub[^]
It uses:
var webRequest = WebRequest.Create("https://api.github.com/repos/twilio/twilio-csharp/contributors") as HttpWebRequest;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900