@dingrtc/token-generator
v1.0.2
Published
dingRTC token generator
Downloads
8
Readme
DingRTC token generator SDK
阿里云音视频通信dingRTC token 生成器,为加入频道生成复合规则的token。
Installation
You can install it as dependency with npm/cnpm or yarn.
$ # save into package.json dependencies with -S
$ npm install @dingrtc/token-generator -S
$ # you can use cnpm for fast install
$ cnpm install @dingrtc/token-generator -S
$ # use yarn for install
$ yarn add @dingrtc/token-generator
二、快速应用
- 生成token
const { produce } = require('@dingrtc/token-generator');
/**
* 传递appId, channelId, userId, appKey
*/
const token = produce(
'appId',
'channelId',
'userId',
'appKey',
);
console.log(token)