微信小程序 wx.request 获取百度API token
来源:互联网 发布:vrp在线算法 编辑:程序博客网 时间:2024/04/28 16:25
wx.request({ url: "https://aip.baidubce.com/oauth/2.0/token", data: { grant_type: "client_credentials", client_id: config.Config.baiduApiKey, client_secret: config.Config.baiduApiSecret }, header:{ "content-type": "application/x-www-form-urlencoded" }, success:function(res){ console.log(res.data) } })
res返回数据例子:
{ "access_token": "1.a6b7dbd428f731035f771b8d15063f61.86400.1292922000-2346678-124328", "expires_in": 86400, "refresh_token": "2.385d55f8615fdfd9edb7c4b5ebdc3e39.604800.1293440400-2346678-124328", "scope": "basic email", "session_key": "ANXxSNjwQDugf8615OnqeikRMu2bKaXCdlLxn", "session_secret": "248APxvxjCZ0VEC43EYrvxqaK4oZExMB",}
阅读全文
0 0
- 微信小程序 wx.request 获取百度API token
- 微信小程序-wx.request获取数据
- 微信小程序把玩(三十)wx.request(object) API
- 微信小程序wx.request程序
- 微信小程序 wx.request({})问题
- 微信小程序wx.request后台数据交互
- 微信小程序网络请求wx.request请求
- 微信小程序 wx.request()无返回结果
- 微信小程序 wx.request 的问题
- 微信小程序wx.request后台数据交互
- 微信小程序 wx.request wepy 简单封装
- 微信小程序数据请求方法wx.request
- 微信小程序网络请求 wx.request() ,data内参数后台获取不到
- 微信小程序 wx.uploadFile(object), wx.downloadFile(object) API
- 微信小程序wx.getImageInfo()获取图片信息
- 微信小程序的ajax数据请求wx.request
- 微信小程序 豆瓣项目中wx.request遇到的问题
- 微信小程序Swiper+wx.request 数据绑定刷新
- PMCAFF微课堂「已结束」 | 阿里资深运营揭秘电商运营与纯互联网运营的区别与互通
- fatal: --author 'user@mail.com' is not 'Name <email>' and matches no existing author
- 做一下笔记,关于奇数分频
- iOS客户端与JAVA服务器之间的RSA加密解密
- laravel ajax POST请求 错误 TokenMismatchException in VerifyCsrfToken.php (line 68)
- 微信小程序 wx.request 获取百度API token
- Apple Pay会不会成为下一个"eBay"(完结)
- git fetch拉取他人分支
- 那些年送出去的交互方案-微博篇
- 征集活动 | PMCAFF八周年,十万产品经理送祝福
- HashMap理解
- [分享]完全中文注释的uC/OS-II2.52源代码
- java表达式之Lambda表达式(一)
- vue-router