-
Notifications
You must be signed in to change notification settings - Fork 104
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
Secret Key being used in URLs #13
Comments
hey! looking now... |
I have a fix in my fork... |
Can you share the code you're using and the error you're getting? It should be something like client := twilio.NewClient("SK123", "auth_token", nil)
client.Messages.SendMessage(...) If you use the secret SK key in place of the account sid, it should be fine, I think. I'm reluctant to add a new parameter if they're both just strings. |
I tried using the key instead but it uses that account ID in other places, like in the URIs of resources so it was breaking downstream. |
Ohhhhh, crap, okay. Let me think about this. |
Secret keys need to be present in the HTTP auth field but not in the URL. Add a new UseSecretKey method on the client that modifies the auth field, but not the URL fields. Fixes saintpete#13.
I just pushed version 0.58 to https://github.com/kevinburke/twilio-go which fixes this problem. client := twilio.NewClient("AC123", "123", nil)
client.UseSecretKey("SK123")
client.Messages.SendMessage("123", "456", "Sending with secret key...", nil) Unfortunately that version of the library expects you to have a "context" package in the standard library, which isn't currently supported on App Engine, unless you're using AE Flex. You can just grab the patch if you want: kevinburke@6ee7bc6 I'll send you an email with some ideas. |
I created an API Key (https://www.twilio.com/docs/api/rest/keys) and tried to use it with twilio-go and I keep getting authentication failures.
The text was updated successfully, but these errors were encountered: