首页
运维部署
苹果MAC系统
Kubernetes(K8S)
nginx 使用geo模块识别ip归属地做跳转
Docker
Docker部署Uptime Kuma
多媒体类
NGINX + OBS = 网页直播服务搭建
CentOS 7部署DNS服务器BIND
监控告警
prometheus(一、基础使用)
Prometheus(二、用snmp监控)
Grafana(1、部署+使用)
Grafana(2、snmp交换机仪表盘自定义)
prometheus_Alertmanager(三、报警配置_邮件)
prometheus_Alertmanager(四、企微 钉钉 告警)
prometheus_blackbox(五、黑盒监测 )
Pushgateway-客户端主动推送告警
snmp_exporter快速监控交换机
多个Prometheus实例互联
exporter自定义监控项
PC
服务器
Dell 服务器R540做raid
服务器电源供电
更换raid阵列卡
企业微信
企业微信api使用
centos7中yum安装dnsmasq内网dns
centos7部署ntopng
Syslog 日志存储
IT-数据恢复
OpenVPN
JumpServer分布式部署
Gitlab
ansible常用命令
将pem证书转换为crt和key
CentOS 7 中搭建ocserv
ocserv相关收藏
ocserv服务器配置实例
ocserv客户端无法将网络共享给其它终端
本文档由 内网文摘 发布,转载请注明出处
-
+
首页
企业微信api使用
获取access_token是调用企业微信API接口的第一步,相当于创建了一个登录凭证,其它的业务API接口,都需要依赖于access_token来鉴权调用者身份。 本次获取access_token是创建日程用的:https://developer.work.weixin.qq.com/devtool/interface/alone?id=18555 请求方式: POST(HTTPS) 请求地址: https://qyapi.weixin.qq.com/cgi-bin/oa/********/add?access_token=ACCESS_TOKEN ACCESS_TOKEN使用自己生成的,有时效 时间戳转换工具网页版 https://www.beijing-time.org/shijianchuo/ **这里使用的post是工具是win10系统自带的** [win10中用PowerShell调用HTTP post 接口](/project-2/doc-270/ "win10中用PowerShell调用HTTP post 接口") #### 实例:企业微信api-用手机号获取userid 官方文档:https://developer.work.weixin.qq.com/document/path/95402 ``` Invoke-WebRequest -UseBasicParsing https://qyapi.weixin.qq.com/cgi-bin/user/getuserid?access_token=ACCESS_TOKEN -ContentType "application/json" -Method POST -Body '{"mobile": "18866669999"}' ``` #### 企微api创建创建日历 https://developer.work.weixin.qq.com/document/path/93647 ``` Invoke-WebRequest -UseBasicParsing https://qyapi.weixin.qq.com/cgi-bin/oa/calendar/add?access_token=ACCESS_TOKEN -ContentType "application/json" -Method POST -Body ' { "calendar": { "admins":[ "ZhangSan" ], "set_as_default": 1, "summary": "test_summary", "color": "#FF3030", "description": "test_describe", "shares": [{ "userid": "ZhangSan" }, { "userid": "LiSi", } ], "is_public": 1, "public_range": { "userids": ["ZhangSan", "LiSi"], "partyids": [1232, 34353] }, "is_corp_calendar": 1 }, "agentid": 1000027 }' ``` 返回结果: ``` StatusCode : 200 StatusDescription : OK Content : {"errcode":0,"errmsg":"ok","cal_id":"wcjJaHCAAAaX_A3_zGhs_bkkmgjd6688"} RawContent : HTTP/1.1 200 OK Connection: keep-alive Error-Code: 0 Error-Msg: ok Content-Length: 71 Content-Type: application/json; charset=UTF-8 Date: Wed, 28 Dec 2022 09:13:08 GMT Server: nginx {"errcod... Forms : Headers : {[Connection, keep-alive], [Error-Code, 0], [Error-Msg, ok], [Content-Length, 71]...} Images : {} InputFields : {} Links : {} ParsedHtml : RawContentLength : 71 ``` #### 企微日历创建创建日程 https://developer.work.weixin.qq.com/document/path/93648 ``` Invoke-WebRequest -UseBasicParsing https://qyapi.weixin.qq.com/cgi-bin/oa/schedule/add?access_token=ACCESS_TOKEN -ContentType "application/json" -Method POST -Body '{ "schedule": { "admins":[ "ZhangSan" ], "start_time": 1672279261, "end_time": 1672281001, "attendees": [{ "userid": "ZhangSan" }], "summary": "需求评审会议", "description": "2.0版本需求初步评审", "reminders": { "is_remind": 1, "remind_before_event_secs": 3600, "is_repeat": 1, "repeat_type": 7, "repeat_until": 1672281001, "is_custom_repeat": 1, "repeat_interval": 1, "repeat_day_of_week": [3, 7], "repeat_day_of_month": [10, 21], "timezone": 8 }, "location": "测试", "cal_id": "wcjJaHCAAAaX_A3_zGhs_bkkmgjd6688" }, "agentid": 1000027 }' ``` 返回结果: ``` StatusCode : 200 StatusDescription : OK Content : {"errcode":0,"errmsg":"ok","schedule_id":"15451f4accf9af139b756f4d9b69abcd"} RawContent : HTTP/1.1 200 OK Connection: keep-alive Error-Code: 0 Error-Msg: ok Content-Length: 76 Content-Type: application/json; charset=UTF-8 Date: Wed, 28 Dec 2022 09:33:02 GMT Server: nginx {"errcod... Forms : Headers : {[Connection, keep-alive], [Error-Code, 0], [Error-Msg, ok], [Content-Length, 76]...} Images : {} InputFields : {} Links : {} ParsedHtml : RawContentLength : 76 ```
local
2022年12月28日 20:57
分享文档
收藏文档
上一篇
下一篇
微信扫一扫
复制链接
手机扫一扫进行分享
复制链接
关于 LocalNetwork
LocalNetwork
是由mrdoc开源
LocalNetwork.cn
修改的在线文档系统,作为个人和小型团队的云笔记、文档和知识库管理工具。
如果此文档给你或你的团队带来了帮助,欢迎支持作者持续投入精力更新和维护!内网文摘 & LocalNetwork
>>>主页
logo
logo
下载Markdown文件
分享
链接
类型
密码
更新密码