Skip to content

Instantly share code, notes, and snippets.

@pandurang90
Last active March 21, 2017 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pandurang90/8b7484bfa4a74ab382d0 to your computer and use it in GitHub Desktop.
Save pandurang90/8b7484bfa4a74ab382d0 to your computer and use it in GitHub Desktop.
opentok session creation
class ChatsController < ApplicationController
def chat
opentok = OpenTok::OpenTok.new OPENTOK_API_KEY, OPENTOK_SECRET_KEY
@session = opentok.create_session
@session_id = @session.session_id
# generate opentok token
@token = session.generate_token
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment