Your Star is the best support for us! It is also the driving force for us to persevere!
PowerWeChat is a WeChat SDK development framework based on Golang. At present, it has covered APIs for most scenarios such as WeChat mini programs, corporate WeChat, and WeChat payment.
PowerWeChat is committed to reducing various difficulties in getting started in WeChat development. Users only need to care about API usage and do not need to pay attention to various AES encryption and decryption, signature and verification, callback notification encryption and decryption, etc. that are needed in the underlying WeChat development.
go get -u github.com/ArtisanCloud/PowerWeChat/v3
Demonstration: Initialize the instance object and call the authorization login interface of the applet
import (
"github.com/ArtisanCloud/PowerWeChat/v3/src/miniProgram"
"os"
)
// 1. 初始化小程序应用实例
app , err := miniProgram . NewMiniProgram ( & miniProgram. UserConfig {
AppID : os . Getenv ( "miniprogram_app_id" ), // 小程序、公众号或者企业微信的appid
Secret : os . Getenv ( "miniprogram_secret" ), // 商户号 appID
HttpDebug : true ,
Debug : false ,
})
// 2. 调用小程序的授权登陆接口
code := "CODE" // 前端小程序登录时,从微信获取的code
rs , err := app . Auth . Session ( code )
printf ( rs . OpenID )
For more example interfaces, please open the official documentation
Official website documentation: Comprehensive interface documentation, convenient for users to search and use the SDK functions we developed
Usage example: You can learn about the configuration and use of PowerWeChat through Tutorial
ps: We wrote a separate project PowerWechatTutorial, which basically covers most commonly used APIs. We hope to help everyone get started with Golang WeChat development faster.
For more information, please refer to the official documentation.
Like many students in the team, they switched from PHP to Golang. I don’t need to introduce the specific reasons and benefits here. But now, because WeChat’s ecosystem is uniquely suited for private domain management, our company has also developed quite a few corporate WeChat functions. It's just that in the process of transforming to golang, I didn't find an easy-to-use SDK like (easywechat). So we want to make some contributions to the students of golang. The product will be maintained and iterated for a long time. I hope students are interested in giving more opinions during the use process.
PowerX customer domain system based on PowerWechat
WeyUI is a WeChat ecological front-end component library that is very friendly to PowerX.
BaiduTrans Baidu Translation Go-SDK, AIGC background prompt translation artifact
Special thanks to Northseadl for their contribution to version 3
If you have any comments, please provide feedback on Github Issues. At the same time, you are also welcome to scan the QR code below to join the WeChat discussion group.
Michael Hu
North Wang