🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

wechat_service_message

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wechat_service_message

send service message to members

latest
npmnpm
Version
1.0.15
Version published
Maintainers
1
Created
Source

Simple use

var Service_Message = require('wechat_service_message');

var sendData = {
	type: type,							//type can be "text", "image" or "voice"
	media_id: media_id,					//media_id is the response you got from https://qyapi.weixin.qq.com/cgi-bin/media/upload?access_token=ACCESS_TOKEN&type=TYPE
	touser: toUser,						//the user_id in wechat-qy
	openid: openid,						//the openid in wechat-mp
	access_token: access_token			//use CorpID and Secret in the qy kf service to exchange access_token
};										

Service_Message.sendMessage(sendData);

  • Where access_token is the access_token you got from other api.
  • data is an object including type content touser openid and access_token

Installation

$ npm install wechat_service_message

Keywords

wechat

FAQs

Package last updated on 10 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts