Exception while creating session

Official OpenTok Server-Side libraries

Exception while creating session

Postby onyii5119 » Sun Nov 18, 2012 7:26 pm

I am using the Java API. Each time I try to create a simple session,I get an exception. Any clues when this is happening?
public OpenTokSession createSession(){
OpenTokSession openTokSession = null;
try{
init();
if (openTokSDK != null){
openTokSession = openTokSDK.create_session();
if (openTokSession != null){
sessionId = openTokSession.getSessionId();
}
}
}catch(Exception e){
e.printStackTrace();
}
log.info(">>>>In createSession(): openTokSession is: "+openTokSession+" and sessionId is: "+sessionId);
return openTokSession;
}


INFO: >>>>In init()
java.io.IOException: Server returned HTTP response code: 403 for URL: https://api.opentok.com/session/create
Was this post helpful? (0)
onyii5119
 
Posts: 1
Joined: Sun Nov 18, 2012 7:12 pm
Thumbs Up: 0

Re: Exception while creating session

Postby mumm » Mon Nov 19, 2012 12:39 pm

Hi,

What does the print stack trade say? You are getting a 403 forbidden which generally means your credentials are not set correctly. Be sure you are setting your API key and secret when you initialize the SDK.
Was this post helpful? (0)
mumm
 
Posts: 392
Joined: Wed May 18, 2011 12:10 am
Thumbs Up: 28


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



Who is online

Users browsing this forum: No registered users and 2 guests

cron