Please excuse our look. We're just getting started here.Want to learn more about Twilio Forums? Check out our FAQ page here.
Twilio sample seems to be missing a using...
Twilio provides a function used to compute a signature from this page (Security | Twilio - click on the C# tab) and that uses the following code:
var hmac = new HMACSHA1(Encoding.UTF8.GetBytes(AuthToken));
However, the sample class does not include a using for System.Security.Cryptography but has a using Twilio.Securty. It seems that HMACSHA1 might be coming from the Twilio library. However, when I install the referenced Twilio NuGet package, HMACSHA1 in the line below is undefined. That leads me to think that it might actually be using System.Security... or that I am install the wrong NuGet package.
Can someone tell me which NuGet package to install for this? I have installed Twilio (Twilio REST API helper Library) and Twilio.AspNet.Core NuGet packages, but the sample code is only using Twilio.Securtiy. That suggests that the Twilio Sample is missing the using System.Security.Cryptography using... or I am using the wrong Twilio NuGet package.
My problem is that the sample code fails to product a valid signature using my Twilio Authentication token. So I'm trying to id what I am doing wrong. I thought it might be that I am using System.Security and not Twilio.Security for HMACSHA1.
- 83 All Categories
- 19 SIGNAL 2021
- 376 Product Discussions
- 7 Community - Announcements
- 2 Changelog
- 4 Forum UI Updates
- 8 Welcome Guide
- 6 Community - Events
- 2 Twilio Relay Developer Conference 2021 Mega Thread
- 1 External Community Events
- 25 Inspiration
- 17 Community - Other Discussions
- 1 Community- Twilio Startups