Official Opencord Plugin SDK for JavaScript
📦 Installation
$ npm install --save @opencord/client
# or
$ yarn add @opencord/client
⚙️ Initialization
import { getClient } from '@opencord/client';
const oc = getClient();
💡 Usage
The OpencordClient provides a set of methods for accessing the SDK's features.
For example, you can use the getCode()
method to retrieve the authorization code.
const { code, message, data } = await oc.getCode();
if (code === 200) {
console.log('✅ Get authorization code successed', data);
} else {
console.log('❌ Get authorization code failed.', code, message);
}