メニュー

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Twilio SDK for C# and .NET

The Twilio C# / .NET SDK makes it easy to interact with the Twilio API from your .NET application. The most recent version of the library can be found on NuGet. The Twilio C# SDK supports .NET applications written in C#, VB.Net, and F# that utilize .NET Framework 3.5 or above or any supported version of .NET Core (.NET Standard v1.4).

ライブラリーをインストールする
When your phone number receives an incoming message or phone call, Twilio will send an HTTP request to your .NET application
1
Twilioサーバー
Your .NET app tells Twilio how to respond (e.g. with a text message, phone menu, etc.)
2
アプリケーション

// Incoming message from Twilio!
var messagingResponse =
    new MessagingResponse();
messagingResponse.Message("Hello from C#!");
return TwiML(messagingResponse);
サンプル全体を表示する
Twilio gets the instructions from your .NET app and takes the appropriate action
3
Hello from C#!

はじめる

From within Visual Studio, you can use the NuGet GUI to search for and install the Twilio NuGet package. Or, as a shortcut, simply type the following command into the Package Manager Console:

Install-Package Twilio

If you are building with the .NET Core command line tools, then you can run the following command from within your project directory:

dotnet add package Twilio

Once installed, try one of the code samples to the right or jump into one of the Quickstarts below.

Need to handle Twilio webhooks with ASP.NET MVC or ASP.NET Core? Be sure to also install the corresponding Twilio.AspNet package.

クイックスタート

アプリケーションを構築する

アプリケーションのアイディアが浮かんだら、プロダクションとして完成させましょう。

皆さんにもっとも適したDocsを選択してください。 これらのガイド、サンプルアプリケーションのチュートリアル、およびAPIリファレンスDocsで、皆さんをHTTP 200 OKへと導きます。

Full .NET SDK Reference

Dig into the Twilio API's and uncover that killer feature you need to make your app awesome.

Common Classes

There are a few common core classes used in the various tutorials and examples. They handle setting up a connection to Twilio, handling errors, and issuing security tokens for client apps.

Common REST API Resource Classes

Each REST API Resource has a corresponding .NET class that you can use to create, fetch, read, update, and delete resources.

Common TwiML Classes

You use TwiML to tell Twilio what to do when you are responding to a Twilio webhook (e.g. a message or a phone call).