README ¶ PowerWeChat SDK 你的Star,是对我们最好的支持!也是我们坚持的动力! PowerWeChat是一款基于Golang的微信SDK开发框架。目前已经覆盖了微信小程序、企业微信、微信支付等绝大部分场景的API。 PowerWeChat致力于减少微信开发中的各种上手难度,使用者只需要关心API使用,不需要关注底层微信开发中需要用到各种AES加密和解密、签名以及验证,回调通知加解密等。 产品特性 简易上手,安装一次,全覆盖微信功能接口 开源项目,丰富的文档内容,长期维护 大部分接口已经支持强类型覆盖 完整的测试项目,支持Web API测试 快速上手 go get -u github.com/ArtisanCloud/PowerWeChat/v3 示范:初始化实例对象,调用小程序的授权登陆接口 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) 更多实例接口,请打开官方文档 文档以及使用示例 官网文档 :全面的接口文档,方便用户查找,使用我们开发的sdk功能 使用示例 :您可以通过Tutorial来了解到PowerWeChat的配置和使用 版本升级描述(V2->V3) 稳定版本v2.0.40 接口添加context参数 解决v2的自动refresh token问题 API快速导航 公众号 入门 基础接口 服务端 消息 多客服消息转发 消息群发 用户 用户标签 网页授权 JSSDK 二维码 短Key托管 临时素材 素材管理 菜单 卡券 客服 摇一摇周边 数据统计 自动回复 评论数据管理 返佣商品 开放平台 入门 服务端 代授权 小程序 用户信息 数据统计与分析 客服消息 统一服务消息 动态消息 插件管理 小程序码 消息解密 内容安全 生物认证 附近的小程序 订阅消息 服务市场 直播 安全风控 URL Scheme 微信支付 入门 订单 退款 对账单 通知 红包 JSSDK 企业付款 撤销订单 分账 企业微信 服务端 应用管理 消息发送 通讯录 网页授权 客户联系 微信客服 临时素材 OA 会话内容存档 电子发票 小程序 JSSDK 群机器人 移动端 更多内容请在官方文档 里面进行查阅。 产品诞生背景 团队也是很多同学一样,从 PHP 转向 Golang,具体为什么,有什么好处,就不用我这里多介绍了吧。 但是现在因为微信的生态做私域化管理是得天独厚,所以我们公司也开发了蛮多企业微信的功能。只是在转型 golang 的过程中,没有找到像 (easywechat)这样好用的 sdk。所以我们就自己想为 golang 的同学们做一点贡献。产品会长期维护,迭代,希望同学们有兴趣在使用的过程中,多给意见。 Contributors 特别感谢 Northseadl为版本3所做的贡献 联系我们 如果有任何意见,欢迎在Github Issue上提供意见反馈。同时,也欢迎扫描下方二维码加入企业微信讨论群。 Expand ▾ Collapse ▴ Documentation ¶ There is no documentation for this package. Source Files ¶ View all Source files main.go Directories ¶ Show internal Expand all Path Synopsis src basicService basicService/contentSecurity basicService/jssdk basicService/media basicService/media/response basicService/qrCode basicService/qrCode/request basicService/qrCode/response basicService/subscribeMessage basicService/subscribeMessage/request basicService/subscribeMessage/response basicService/url basicService/url/request basicService/url/response kernel kernel/contract kernel/decorators kernel/exception kernel/messages kernel/models kernel/power kernel/providers kernel/request kernel/response kernel/support miniProgram miniProgram/auth miniProgram/auth/response miniProgram/base miniProgram/base/request miniProgram/base/response miniProgram/customerServiceMessage miniProgram/customerServiceMessage/request miniProgram/customerServiceMessage/response miniProgram/dataCube miniProgram/dataCube/request miniProgram/dataCube/response miniProgram/express miniProgram/express/response miniProgram/image miniProgram/image/response miniProgram/immediateDelivery miniProgram/immediateDelivery/response miniProgram/internet miniProgram/internet/response miniProgram/liveBroadcast miniProgram/liveBroadcast/request miniProgram/liveBroadcast/response miniProgram/nearbyPoi miniProgram/nearbyPoi/response miniProgram/ocr miniProgram/ocr/response miniProgram/operation miniProgram/operation/response miniProgram/phoneNumber miniProgram/phoneNumber/response miniProgram/plugin miniProgram/plugin/response miniProgram/riskControl miniProgram/riskControl/request miniProgram/riskControl/response miniProgram/search miniProgram/search/response miniProgram/security miniProgram/security/response miniProgram/server miniProgram/serviceMarket miniProgram/serviceMarket/request miniProgram/serviceMarket/response miniProgram/shortLink miniProgram/shortLink/response miniProgram/soter miniProgram/soter/request miniProgram/soter/response miniProgram/uniformMessage miniProgram/uniformMessage/request miniProgram/uniformMessage/response miniProgram/updatableMessage miniProgram/updatableMessage/request miniProgram/updatableMessage/response miniProgram/urlLink miniProgram/urlLink/request miniProgram/urlLink/response miniProgram/urlScheme miniProgram/urlScheme/request miniProgram/urlScheme/response miniProgram/wxaCode officialAccount officialAccount/auth officialAccount/autoReply officialAccount/autoReply/response officialAccount/base officialAccount/base/response officialAccount/broadcasting officialAccount/broadcasting/request officialAccount/broadcasting/response officialAccount/card officialAccount/card/request officialAccount/card/response officialAccount/comment officialAccount/comment/response officialAccount/customerService officialAccount/customerService/request officialAccount/customerService/response officialAccount/customerService/session officialAccount/customerService/session/response officialAccount/dataCube officialAccount/dataCube/response officialAccount/device officialAccount/device/request officialAccount/device/response officialAccount/goods officialAccount/goods/request officialAccount/goods/response officialAccount/guide officialAccount/guide/request officialAccount/guide/response officialAccount/material officialAccount/material/request officialAccount/material/response officialAccount/menu officialAccount/menu/request officialAccount/menu/response officialAccount/oauth officialAccount/ocr officialAccount/ocr/response officialAccount/poi officialAccount/poi/request officialAccount/poi/response officialAccount/semantic officialAccount/server officialAccount/server/handlers officialAccount/server/handlers/models officialAccount/shakeAround officialAccount/shakeAround/request officialAccount/shakeAround/response officialAccount/store officialAccount/store/request officialAccount/store/response officialAccount/templateMessage officialAccount/templateMessage/request officialAccount/templateMessage/response officialAccount/user officialAccount/user/request officialAccount/user/response officialAccount/user/tag officialAccount/user/tag/response officialAccount/wifi officialAccount/wifi/request officialAccount/wifi/response openPlatform openPlatform/auth openPlatform/authorizer/aggregate openPlatform/authorizer/aggregate/account openPlatform/authorizer/aggregate/account/response openPlatform/authorizer/auth openPlatform/authorizer/miniProgram openPlatform/authorizer/miniProgram/account openPlatform/authorizer/miniProgram/account/response openPlatform/authorizer/miniProgram/auth openPlatform/authorizer/miniProgram/auth/response openPlatform/authorizer/miniProgram/code openPlatform/authorizer/miniProgram/code/request openPlatform/authorizer/miniProgram/code/response openPlatform/authorizer/miniProgram/domain openPlatform/authorizer/miniProgram/domain/request openPlatform/authorizer/miniProgram/domain/response openPlatform/authorizer/miniProgram/material openPlatform/authorizer/miniProgram/privacy openPlatform/authorizer/miniProgram/privacy/request openPlatform/authorizer/miniProgram/privacy/response openPlatform/authorizer/miniProgram/setting openPlatform/authorizer/miniProgram/setting/request openPlatform/authorizer/miniProgram/setting/response openPlatform/authorizer/miniProgram/tester openPlatform/authorizer/miniProgram/tester/request openPlatform/authorizer/miniProgram/tester/response openPlatform/authorizer/officialAccount openPlatform/authorizer/officialAccount/account openPlatform/authorizer/officialAccount/account/response openPlatform/authorizer/officialAccount/miniProgram openPlatform/authorizer/server openPlatform/base openPlatform/base/response openPlatform/codeTemplate openPlatform/codeTemplate/response openPlatform/component openPlatform/component/request openPlatform/response openPlatform/server openPlatform/server/callbacks openPlatform/server/handlers openWork openWork/auth openWork/base openWork/base/response openWork/contact openWork/corp openWork/corp/response openWork/device openWork/license openWork/media openWork/miniProgram openWork/provider openWork/server openWork/server/handlers openWork/suitAuth payment payment/base payment/base/response payment/bill payment/bill/response payment/jssdk payment/kernel payment/notify payment/notify/request payment/order payment/order/request payment/order/response payment/profitSharing payment/profitSharing/request payment/profitSharing/response payment/promotion payment/promotion/request payment/promotion/response payment/redpack payment/redpack/request payment/redpack/response payment/redpack/work payment/refund payment/refund/request payment/refund/response payment/reverse payment/reverse/response payment/sandbox payment/transfer payment/transfer/request payment/transfer/response work work/accountService work/accountService/customer work/accountService/customer/request work/accountService/customer/response work/accountService/message work/accountService/message/request work/accountService/message/response work/accountService/request work/accountService/response work/accountService/serviceState work/accountService/serviceState/response work/accountService/servicer work/accountService/servicer/response work/accountService/tag work/agent work/agent/request work/agent/response work/agent/workbench work/auth work/base work/base/response work/corpgroup work/corpgroup/response work/department work/department/request work/department/response work/externalContact work/externalContact/contactWay work/externalContact/contactWay/request work/externalContact/contactWay/response work/externalContact/customerStrategy work/externalContact/customerStrategy/request work/externalContact/customerStrategy/response work/externalContact/groupChat work/externalContact/groupChat/request work/externalContact/groupChat/response work/externalContact/groupWelcomeTemplate work/externalContact/groupWelcomeTemplate/request work/externalContact/groupWelcomeTemplate/response work/externalContact/messageTemplate work/externalContact/messageTemplate/request work/externalContact/messageTemplate/response work/externalContact/moment work/externalContact/moment/request work/externalContact/moment/response work/externalContact/momentStrategy work/externalContact/momentStrategy/request work/externalContact/momentStrategy/response work/externalContact/request work/externalContact/response work/externalContact/school work/externalContact/statistics work/externalContact/statistics/request work/externalContact/statistics/response work/externalContact/tag work/externalContact/tag/request work/externalContact/tag/response work/externalContact/transfer work/externalContact/transfer/request work/externalContact/transfer/response work/externalPay work/externalPay/request work/externalPay/response work/groupRobot work/groupRobot/request work/groupRobot/response work/invoice work/invoice/request work/invoice/response work/jssdk work/media work/media/response work/menu work/menu/request work/menu/response work/message work/message/appChat work/message/appChat/request work/message/appChat/response work/message/externalContact work/message/externalContact/response work/message/linkedCorp work/message/linkedCorp/response work/message/request work/message/response work/miniProgram work/miniProgram/auth work/miniProgram/response work/msgAudit work/msgAudit/response work/oa work/oa/calendar work/oa/calendar/response work/oa/dial work/oa/dial/request work/oa/dial/response work/oa/journal work/oa/journal/response work/oa/living work/oa/living/request work/oa/living/response work/oa/meeting work/oa/meeting/request work/oa/meeting/response work/oa/meetingroom work/oa/meetingroom/request work/oa/meetingroom/response work/oa/pstncc work/oa/pstncc/response work/oa/request work/oa/response work/oa/schedule work/oa/schedule/response work/oa/webdrive work/oa/webdrive/request work/oa/webdrive/response work/oauth work/oauth/request work/server work/server/handlers work/server/handlers/models work/user work/user/batchJobs work/user/exportJobs work/user/linkedCorp work/user/request work/user/response work/user/tag Click to show internal directories. Click to hide internal directories.