Generate Sessions and Tokens using REST

Ask questions about the iOS API here

Generate Sessions and Tokens using REST

Postby Guest-mbdqzkkeqw » Sat Nov 17, 2012 1:25 am

I am displaying video between 2 ios devices and have to generate tokens and sessions. I think its possible to generate session id using the REST API (https://api.opentok.com/hl/session/create) . Is it also possible to generate the token id using REST api or do I have to install the SDK on my server ?

Thanks
Was this post helpful? (0)
Guest-mbdqzkkeqw
 
Posts: 2
Joined: Fri Oct 26, 2012 5:37 pm
Thumbs Up: 0

Re: Generate Sessions and Tokens using REST

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

Hi,

You do not need to make a network request to generate a token—it is a cryptographic hash. Typically it is best to use one of our server-side libraries that already exist for this, however you could also write your own. For an example, look at the generate_token() method here: https://github.com/opentok/opentok-node ... opentok.js

Jon
Was this post helpful? (0)
mumm
 
Posts: 392
Joined: Wed May 18, 2011 12:10 am
Thumbs Up: 29

Re: Generate Sessions and Tokens using REST

Postby charley » Mon Nov 19, 2012 1:28 pm

...that said, there is no Objective-C implementation because token creation requires the use of your partner key secret. Token creation on the client would require you to distribute your app with your secret embedded, which is not an ideal security consideration.
Was this post helpful? (0)
charley
 
Posts: 418
Joined: Fri May 06, 2011 7:41 pm
Thumbs Up: 33


Return to iOS (Native)



Who is online

Users browsing this forum: No registered users and 1 guest

cron