Skip to content
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

Invalid token generation #201

Closed
dylanjmcdonald opened this issue Oct 13, 2016 · 1 comment
Closed

Invalid token generation #201

dylanjmcdonald opened this issue Oct 13, 2016 · 1 comment

Comments

@dylanjmcdonald
Copy link

My node server is producing an invalid token each time I request one from my iOS application. When I set my token endpoint in my iOS application to use my Node server I receive a "Twilio Services Error" error, but when I swap the endpoint to use the python quickstart server from Twilio, which I have hosted on Heroku, it works correctly. I've triple checked that the Account SID, Auth Token, and Application SID match across both servers.

twilio-node version: 2.11.0

Token Endpoint

app.get('/token', function (request, response) {

    var capability = new twilio.Capability(config.TWILIO_ACCOUNT_SID, config.TWILIO_AUTH_TOKEN);

    capability.allowClientOutgoing(config.TWILIO_TWIML_APP_SID);

    var token = capability.generate();

    response.send(token);

});
@dylanjmcdonald dylanjmcdonald changed the title Invalid Token Generation Invalid token generation Oct 13, 2016
@jingming
Copy link
Contributor

@dylanjmcdonald we updated the JWT generation mechanism in the latest version of the library. Please give that a try and let us know if the problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants