文档
测试

通过 code 换取网页授权access_token和OpenId

GET
https://api.weixin.qq.com/sns/oauth2/access_token?appid=wx122e0df572219337&secret=33f1d0fbb7f0b8fa805806d8c852a7c1&code=041JGYll2Rg5n94IlEol29PWob0JGYlF1&grant_type=authorization_code

请求参数

参数名
类型
描述
必填
appid
string
示例:wx122e0df572219337
可选
secret
string
示例:33f1d0fbb7f0b8fa805806d8c852a7c1
可选
code
string
示例:041JGYll2Rg5n94IlEol29PWob0JGYlF1
可选
grant_type
string
示例:authorization_code
可选