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 ?
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
...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.