We intend to sunset the Programmable Chat API on July 25, 2022 to focus on the next generation of chat: the Twilio Conversations API. Find out about the EOL process. We have also prepared this Migration Guide to assist in the transition from Chat to Conversations.
C# implementation of Twilio Chat using ASP.NET MVC
NOTE: You need a Windows environment with Visual Studio to run this project. Since this project was made using .NET Framework 4.5, it's not compatible with .NET Core, so it's mandatory to run on Windows.
-
Clone this repository and
cd
into its directory:git clone git@github.com:TwilioDevEd/twiliochat-csharp.git cd twiliochat-csharp
-
Create a new file
TwilioChat.Web/Local.config
and update the content with:<appSettings> <add key="TwilioAccountSid" value="Your Twilio Account SID" /> <add key="TwilioApiKey" value="Your Twilio API Key" /> <add key="TwilioApiSecret" value="Your Twilio API Secret" /> <add key="TwilioChatServiceSid" value="Your Chat Service SID" /> </appSettings>
As usual your
TwilioAccountSid
can be found at https://www.twilio.com/user/accountYour
TwilioApiKey
andTwilioApiSecret
can be found at https://www.twilio.com/console/dev-tools/api-keysAnd finally, your
TwilioChatServiceSid
can be found at https://www.twilio.com/console/chat/dashboard -
Open the project using Visual Studio
-
Using Visual Studio's UI, choose Build Solution from the Build menu.
-
To run the code, click the green play button in the toolbar.
-
Check it out at http://localhost:1398
That's it!
- If Test Explorer is not open, open it by choosing Test > Windows > Test Explorer from the top menu bar.
- Choose Run All to run the tests.
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.