@dingrtc/token-generator
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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: 'xxxx',
  channelId: 'xxxx',
  userId: 'xxxx',
  appKey: 'xxxx',
});
console.log(token)

Readme

Keywords

none

Package Sidebar

Install

npm i @dingrtc/token-generator

Weekly Downloads

3

Version

1.0.4

License

ISC

Unpacked Size

7.22 kB

Total Files

4

Last publish

Collaborators

  • shawn_huang
  • villeewang
  • leopano