-
Notifications
You must be signed in to change notification settings - Fork 302
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
Clarify use of API keys #531
Comments
This is a larger Twilio issue regarding auth/identity. Let me explain.
So if you're using I'm not sure what's the best way to update the docs, unless just sticking that explanation in the class docs would suffice. |
That explains the problem. Would it be of interest to have the library track whether one is using Account or Key tokens? When calling I think you have a specific prefixes for account and key SID so that would be detectable even without modifying the Init methods. This is my suggestion, if you think it's valuable I can create a PR for it.
|
You are welcome to submit a PR with the proposed improvements and we will add it to our backlog for review. |
I am interested to contribute on this,please assign this issue to me |
Hi @gagandeepp , |
Most of the docs only mention that we use the API Keys as username and password (see - https://www.twilio.com/docs/usage/requests-to-twilio#api-keys) This is misleading especially when requests respond with an error code of 90002 with status 400. Could we also please improve on the error code supplied?
And error 90002 is for your product Flex and doesn't seem to make sense for this scenario. Could we improve this part of twilio doc if that seems like a reasonable suggestion. |
The Twilio console for API keys states:
This made me think I could use code like this:
But that didn't work.
This one did:
Have I understood it correctly in that the first Init only works with Account SID and the other Init is intended for API keys?
If so I think you should update the API signature to reflect this.
In the first Init, rename the parameters to accountSID and authToken.
In the second Init, rename the parameters to keySID, keySecret and remove the comment in the summary about "separate account SID" since that made me think you can use one account credential to init against another account(which doesn't make sense)
twilio-csharp/src/Twilio/Twilio.cs
Lines 20 to 42 in 165072f
The text was updated successfully, but these errors were encountered: