ColdFusion-Twilio-Library icon indicating copy to clipboard operation
ColdFusion-Twilio-Library copied to clipboard

Error when testing monkeyphone

Open Molnfront opened this issue 11 years ago • 5 comments

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") />

#token#

Molnfront avatar Jan 04 '14 00:01 Molnfront

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 avatar Apr 04 '14 04:04 chapmandu

@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 avatar Jul 06 '14 11:07 jasonfill

@jasonfill Did you tried it yourself? I'm trying as well, but get the same error. Any idea where to look?

mvanleest avatar Mar 14 '15 22:03 mvanleest

@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 :/.

jasonfill avatar Mar 15 '15 10:03 jasonfill

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.

mvanleest avatar Mar 17 '15 04:03 mvanleest