Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

sail1972/workapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

2 Commits

Repository files navigation

WorkAPI 企业微信 golang 接口

为了学习golang和企业微信接口,重新造轮子。

json 包使用 json-iterator

cache 包使用 go-cache

功能

  • 实现了应用令牌的获取。(注意: 同一 CorpID 下,会有不同应用的 Secrect,返回的访问令牌 Access Token 也是不同的。调用不同的 Agent,要使用不同的 Access Token)

  • 实现了通讯录中部门、用户、标签信息的获取。

使用

go get -u github.com/sail1972/workapi
package main
import github.com/sail1972/workapi
func main() {
 ...
 wx := workapi.NewWorkAPI(corpid, secrect, appid)
 go wx.GetAccessToken()
 ...
 token, err := wx.GetTokenString()
 if err != nil {
 fmt.Println("Get access token error.")
 }
}

感谢

本项目开发创意参考了以下项目,特此感谢!

sdvdxl 的 falcon-message

sbzhu 的 weworkapi_python

hai046 的 workweixin-go

silenceper 的 wechat

aiportal 的 wechat-proxy

About

企业微信API/Weixin Work API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /