-3

curl for Twilio with out helper library

curl -X POST 'https://api.twilio.com/2010-04-01/Accounts/[sid]/Messages.xml' \
--data-urlencode 'To=+919400xxxxxx'  \
--data-urlencode 'From=+1484925xxxx'  \
--data-urlencode 'Body=[body]' \
-u [sid]:[AuthToken]

I wanted to Do it using C# code. ( I don't have much knowledge in C# )

I just checked these

  1. Making a cURL call in C#
  2. cURL with user authentication in C#

But gives invalid request.

7
  • Do you seriously think that "I don't have much knowledge in C#" is a good justification for being lazy? Commented Nov 8, 2014 at 11:20
  • What is your question? Do you want to call curl from C# or do you want to make that web request directly in C#? Commented Nov 8, 2014 at 11:22
  • @zerkms I am a PHP developer. During college days I just did some C# ( about 5 years ago ). Now I accidentally met a situation to use Twilio on a ASP project. I tried something but it not work much... Commented Nov 8, 2014 at 11:28
  • @delixfe I want to make that web request directly. Commented Nov 8, 2014 at 11:29
  • @Arjun Raj: if it's a paid project - then just don't apply on something you cannot handle. If it's an educational project - learn how to program C#. Either way, asking us to code for you for free makes little to no sense. Commented Nov 8, 2014 at 11:40

1 Answer 1

3

You can start by using Nuget to download the Twilio helpers, search for Twilio. Once you have that package installed, you can use it like this.

var client = new TwilioRestClient("accountsid", "authtoken");
var result = client.SendSmsMessage("from", "to", "body");
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.