Token Not Working

Official OpenTok Server-Side libraries

Token Not Working

Postby breal123 » Wed Apr 11, 2012 12:36 pm

I am using the .NET SDK and for whatever reason I am unable to use the server generated token. The only token I can use is "devtoken" I just downloaded the SDK, made the required changes in the web.config file and nothing works. Here is the response that I am getting that I am getting on my local machine. I also tried changing the REMOTE_ADDR value to 127.0.0.1 without any luck.

[DEBUG] opentok: TB.setLogLevel(4)
[DEBUG] opentok: TB.addEventListener(exception)
[DEBUG] opentok: TB.removeEventListener(exception)
[DEBUG] opentok: TB.addEventListener(exception)
[DEBUG] opentok: TB.checkSystemRequirements()
[DEBUG] opentok: TB.initSession(1_MX4xNDE0NzEwMn4xOTIuMTY4LjU2LjF-MjAxMi0wNC0xMSAxOToyODo0My43ODczNzArMDA6MDB-MC4wNTg3MTEwNjk0MTI2fg)
[DEBUG] opentok: TB.removeEventListener(sessionConnected)
[DEBUG] opentok: TB.addEventListener(sessionConnected)
[DEBUG] opentok: TB.removeEventListener(sessionDisconnected)
[DEBUG] opentok: TB.addEventListener(sessionDisconnected)
[DEBUG] opentok: TB.removeEventListener(connectionCreated)
[DEBUG] opentok: TB.addEventListener(connectionCreated)
[DEBUG] opentok: TB.removeEventListener(connectionDestroyed)
[DEBUG] opentok: TB.addEventListener(connectionDestroyed)
[DEBUG] opentok: TB.removeEventListener(streamCreated)
[DEBUG] opentok: TB.addEventListener(streamCreated)
[DEBUG] opentok: TB.removeEventListener(streamDestroyed)
[DEBUG] opentok: TB.addEventListener(streamDestroyed)
[DEBUG] opentok: Session.connect(14025841)
[DEBUG] opentok: TB.checkSystemRequirements()
[ERROR] opentok: TB.exception :: title: Connect Failed msg: SessionInfoAPI :: Failed to get session info - Error #2032 errorCode: 1014

also here is the server that is defined in my web.config
<add key="opentok_server" value="https://staging.tokbox.com/hl"/>


Any ideas? My other question is what is going to happen when I try to move it over to the production server? Do we have to go through this process all over again?
Was this post helpful? (0)
breal123
 
Posts: 1
Joined: Wed Apr 11, 2012 11:48 am
Thumbs Up: 0

Re: Token Not Working

Postby squiddle » Thu Apr 12, 2012 4:21 am

I have the same problem using the Java SDK

Code: Select all
[DEBUG] opentok: TB.setLogLevel(4)
TB.min.js:4231[DEBUG] opentok: TB.initSession(1_MX4xMzEwMTk0Mn4xMjcuMC4wLjF-MjAxMi0wNC0xMiAxMTowODozMS43ODU2NTQrMDA6MDB-MC44OTg1MTU4OTIyMzh-)
TB.min.js:4231[DEBUG] opentok: TB.removeEventListener(sessionConnected)
TB.min.js:4231[DEBUG] opentok: TB.addEventListener(sessionConnected)
TB.min.js:4231[DEBUG] opentok: TB.removeEventListener(sessionConnected)
TB.min.js:4231[DEBUG] opentok: TB.addEventListener(sessionConnected)
TB.min.js:4231[DEBUG] opentok: TB.removeEventListener(streamCreated)
TB.min.js:4231[DEBUG] opentok: TB.addEventListener(streamCreated)
TB.min.js:4231[DEBUG] opentok: TB.removeEventListener(streamDestroyed)
TB.min.js:4231[DEBUG] opentok: TB.addEventListener(streamDestroyed)
TB.min.js:4231[DEBUG] opentok: Session.connect(13101942)
TB.min.js:4231[DEBUG] opentok: TB.checkSystemRequirements()
POST http://anvil-staging.tokbox.com/session/1_MX4xMzEwMTk0Mn4xMjcuMC4wLjF-MjAxMi0wNC0xMiAxMTowODozMS43ODU2NTQrMDA6MDB-MC44OTg1MTU4OTIyMzh-?extended=True 500 (Internal Error)
TB.min.js:4231[ERROR] opentok: TB.exception :: title: Connect Failed msg: SessionInfoAPI :: Failed to get session info - Error #2032 errorCode: 1014

Was this post helpful? (0)
squiddle
 
Posts: 3
Joined: Thu Apr 12, 2012 4:19 am
Thumbs Up: 0

Re: Token Not Working

Postby jtsai » Thu Apr 12, 2012 5:08 pm

@breal123

The .NET SDK has a bug in it. In OpenTok.cs, edit line 93. Right trim the last "&" for dataString. Also change "createTime" to "create_time" a bit before that. After this, your tokens should work.

@squiddle

Can you post the token you are trying to use?

Thanks,
John
Was this post helpful? (0)
Very helpful resource: Devs Checklist
Examples with OpenTok: Examples
User avatar
jtsai
 
Posts: 1954
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 157


Return to Supported Server API (PHP, Java, Ruby, Python)



Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron