Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

opentok-cli

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

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

  • 1.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 05 Sep 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc