-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for API Keys authentication with Twilio Binding #8039
Comments
Hi @Swimburger , Thank you for your feedback! We will check for the possibilities internally and update you with the findings. |
Hi @Swimburger , Opened a new issue for further insights - twilio/twilio-csharp#593. Closing this issue here. |
I'm confused why an issue would be opened at Twilio's C# SDK repo, it already supports what I am suggesting which is described in the article I referenced. This is a feature request for the Twilio binding for Azure Functions, not for the Twilio C# SDK. |
Hi @Swimburger , Apologies for the confusion. We will investigate this further and update you with the findings. |
Hi @Swimburger , I checked this internally. Adding this issue as a feature request to consider this in future implementations. |
What problem would the feature you're requesting solve? Please describe.
Currently, the Twilio binding requires you to use the account SID and the account auth token.
This is the quickest way to authenticate, but a better way is to use Twilio API keys.
You can read more about switching to API keys with C# here: https://www.twilio.com/blog/better-twilio-authentication-csharp-twilio-api-keys
Describe the solution you'd like
Add a property or properties to support API keys. In Twilio's SDK the arguments to authenticate are username, password, and account SID.
To authenticate using account SID and account auth token, you'd pass in account sid to the username, and the account auth token to the password.
To authenticate using API keys, you'd pass in the API key SID to the username, and the API key secret to the password, and the account SID to accountSid.
Since the Twilio attribute for the Azure Function binding uses different property names, you probably can't follow the same naming convention without a breaking change.
I'd suggest adding 2 new properties to make this as explicit as possible without breaking changes.
If those are filled out, you know the user wants to use API key authentication. Or even more explicitly, you could add an enum property to switch between the two types of auth.
Describe alternatives you've considered
I tried using the API key SID and API key secret as account SID and auth token in the binding, but that didn't work.
The text was updated successfully, but these errors were encountered: