Minimal Example

A little example of using uxlink-js-sdk

Connecting to UXAuth

By calling the login method we provide, you can quickly get the token, which currently supports WeChat and telegram 2 methods

用微信登录授权

// 
const { auth, interfaces } = new UXLINK();

// connectTo to wechat
await auth.connectTo(interfaces.LoginAuthType.wx, AppID, redirectUri, state);
WeChat login will redirectUri will return the code, when we get the code, we can get the token required by UXLINK
// getUrlCode("code");
const uxlinkToken = await auth.toWX(code);

const { account } = new UXLINK.init(uxlinkToken,apikey)

Login with Telegram

If you use the robot API to develop, please connect with the API we provide

coming soon

Last updated