一、获取access_token

1、https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=ID&corpsecret=SECRECT

Corpid和secrect是唯一的

小程序

 access_token:有效期2小时

小程序

二、获取code

小程序调用wx.login获取临时登录凭证code,并回传到开发者服务器

小程序

 

三、获取用户id

  • https://qyapi.weixin.qq.com/cgi-bin/miniprogram/jscode2session?access_token=ACCESS_TOKEN&js_code=CODE&grant_type=authorization_code
  • 返回结果

    小程序

    TAG标签: 微信小程序企业微信登陆

    http://www.xiaochengxub.com/read-101651.html