Socket
Socket
Sign inDemoInstall

opentok-cli

Package Overview
Dependencies
33
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    opentok-cli

CLI to generate a sessionId and token given an apiKey and secret


Version published
Weekly downloads
0
Maintainers
1
Install size
16.9 MB
Created
Weekly downloads
 

Readme

Source

opentok-cli

Command line interface to generate a sessionId and token given an apiKey and secret. This is useful when you're trying to quickly test OpenTok code and you want to generate a sessionId and token.

Install

npm install -g opentok-cli

Usage

Options:

--apikey, -a	An OpenTok API Key
--secret, -s	An OpenTok API Secret
--role, -r	Optional role to assign to the token, one of moderator, publisher or subscriber (moderator by default)
--expires, -e	Optional expire time for the token in milliseconds (30 days from now by default) (integer)
--p2p, -p	Whether this session should be a relayed (p2p) session or a routed session ("true" or "false", "false" by default)
--sessionId, -i	Optional sessionId parameter to generate a token for
--code, -c	Optional whether to output a code snippet ("true" or "false", "false" by default)
--env, -v	Optional environment parameter "prod", "dev", "rel" or API URL (prod by default)

Example: opentok-cli -a <APIKEY> -s <API_SECRET>

If you don't want to remember your apiKey and secret every time you can add an alias to your .bash_profile so you can easily generate sessionIds and tokens whenever you want without any arguments. Although, you should consider the security of your secret, it's probably not the best idea to store it in plain text on your computer.

FAQs

Last updated on 05 Sep 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc