ColdFusion-Twilio-Library
ColdFusion-Twilio-Library copied to clipboard
Error when testing monkeyphone
I am trying to communicate with twilio from a iOS app, but got error:
HelloMonkey[73244:5503] Error establishing connection due to error: Invalid JWT token, invalid literal for int() with base 10: '1388792878.629' domain: TwilioServicesErrorDomain code: 31002
I do not know if i got this right in the auth.cfm file. Do I need to add something more then the app sid to the param struct in the allowClientOutgoing method and in that case what? https://gist.github.com/Molnfront/8249725
<cfset cap.allowClientOutgoing("APf0a7xxxxxxxxxxxxxxx") />
I'm receiving the same error: Below are the client errors logged to the browser console.
Object { code=31204, message="Invalid capability token", info={...}} Object { code="NetConnection.Connect.Rejected", info={...}, message=undefined} Object { code="NetConnection.Connect.Failed", info={...}, message=undefined}
The code=31204 is indeed "JWT token is not a valid JWT token." https://www.twilio.com/docs/client/errors
I'd be very grateful for a fix.. :)
I'm on Railo 4.1.3.005 OSX
@chapmandu Sorry for the delay on this. Were you able to find a fix? If not I will look at what is going on, if so, mind creating a pull request so it can be rolled into the lib?
@jasonfill Did you tried it yourself? I'm trying as well, but get the same error. Any idea where to look?
@mvanleest I have not tried this yet myself. I can try to look at it this week, but am not sure I will have time to work out the issue or not :/.
I've been looking into it a bit more. The error in the JWT token is in the "payload". I've downloaded the Java SDK and created a token with this SDK and the Java SDK and there is a difference in the payload part of the JWT (and because of that, the signature as well).
I will update accordingly as I keep on digging into this issue.