zoukankan      html  css  js  c++  java
  • 微信第三方平台代公众号发起网页授权 48001 api unauthorized 问题

    https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_cod
     
    这个为普通公众号调用模式。
    --------------------------------------------------------------
     
     
    以下为第三方平台服务端调用模式:
    通过code换取access_token获取 openid的接口得用
    https://api.weixin.qq.com/sns/oauth2/component/access_token?appid=APPID&code=CODE&grant_type=authorization_code&component_appid=COMPONENT_APPID&component_access_token=COMPONENT_ACCESS_TOKEN 这个接口,(此接口是open.weixin.qq.com里面提供的)注意看这个接口跟上面接口的区别 ,以及参数的区别。 此接口的所有参数都可以获取到。但是要注意的是调用此接口有可能会出现48001 api unauthorized 这个错误 ,引起这个错误的原因是

        component_access_token   这个参数  注意看文档  服务开发方的access_token不是公众账号授权给第三方平台后返回的
        access_token。  这个参数的值需要通过  https://api.weixin.qq.com/cgi-bin/component/api_component_token这个接口获取
         
        完美解决48001 api unauthorized

  • 相关阅读:
    TCP和UDP知识总结
    使用 DataX 增量同步数据(转)
    python对象类型
    Asp.net mvc使用SignaIR
    数据库分库分表思路 [转]
    Linux基本操作 [转]
    RabbitMQ入门教程 [转]
    设计模式
    设计模式六大原则
    Javascript实现数组去重 [转]
  • 原文地址:https://www.cnblogs.com/Fooo/p/12033927.html
Copyright © 2011-2022 走看看