zoukankan      html  css  js  c++  java
  • 微信 oauth授权2

    2.前面请求成功后 会在跳转url后得到

    ?code=00b788e3b42043c8459a57a8d8ab5d9f&state=1


    3.之后

    使用code换取access_token

    换取网页授权access_token页面的构造方式:

    https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code

    参数说明

    参数是否必须说明
    appid 公众号的唯一标识
    secret 公众号的appsecret
    code 填写第一步获取的code参数
    grant_type 填写为authorization_code

    code:在这里填写为上一步获得的值

    构造请求url如下:

    https://api.weixin.qq.com/sns/oauth2/access_token?appid=wx8888888888888888&secret=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&code=00b788e3b42043c8459a57a8d8ab5d9f&grant_type=authorization_code
  • 相关阅读:
    枚举子集 Codeforces306 Div2 B
    UVA140 剪枝
    回溯法浅谈
    UVA10976
    UVA11059
    BZOJ3355
    hdu 2509 博弈 *
    博弈专题
    hdu 1404 找sg ***
    hdu 4759 大数+找规律 ***
  • 原文地址:https://www.cnblogs.com/yelongsan/p/6408312.html
Copyright © 2011-2022 走看看