Click here to Skip to main content
13,901,218 members
Rate this:
 
Please Sign up or sign in to vote.
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
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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...
   
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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;
   

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web05 | 2.8.190306.1 | Last Updated 12 Jan 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100