Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including onebuck with all npm packages installed. Try it out:

var onebuck = require("onebuck")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

onebuck v1.0.7

utility for connecting to tencent products

A toolkit that provides some methods to help you to integrate you app to tencent products such as qq, wechat, etc.

use with async

var onebuck = require('./index');
var mp ='yourappid', 'yourappsecret');

var run = async (func) => {

run(async () => {
    try {
        // get at
        var at = await mp.getAccessToken();
        // get user list
        var ul = await mp.getUserList(at);
        // get user info
        var u = await mp.getUserInfo(at,[0]);
        // get template list
        var tl = await mp.getTemplates(at);
        // send message
        var msgId = await mp.sendMessage(at, 'openid', 'templateid',
                msg: {
                    value: new Date().toString()
        // get js ticket
        var ticket = await mp.getJsTicket(at);
        var signature = mp.getJsSignature(ticket, 'redirecturl');
    catch (err) {


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free