zoukankan      html  css  js  c++  java
  • PCS API

    1、进入 http://developer.baidu.com/console#manage/apilist! 创建项目
    2、https://openapi.baidu.com/oauth/2.0/authorize?response_type=code&client_id={API Key}&redirect_uri=oob,替换API KEY进行授权,获取授权码AccessToken

    3、https://openapi.baidu.com/oauth/2.0/token?grant_type=authorization_code&code={Access Token}&client_id={API Key}&client_secret={Secret Key}&redirect_uri=oob 
    redirect_uri默认为oob,参照百度帮助文档->OAuth
    得到结果如下:
    {
    "expires_in":xxx,
    "refresh_token":"xxx",
    "access_token":"xxx",
    "session_secret":"xxx",
    "session_key":"xxx",
    "scope":"basic"
    }
    4、参照官方格式替换http://developer.baidu.com/wiki/index.php?title=docs/oauth/redirect
    进入项目->安全设置按照以下格式替换后提交:
    http://openapi.baidu.com/oauth/2.0/login_success#expires_in=2592000&access_token=21.c000626bf8880c097aaee27aed9842ed.2592000.1522823522.2468651268-10881219&session_secret=d2f757193b1b5fc2d319e6f1fa07edfd&session_key=9mnRJ9ezymUnX8HYFHbXlgs1Dw4/Ai9suCZc2IMxaEtL7aOrGgfwE59H9Us8Y4kMwWV3kjg9kD6nlOV4VRTKp8rs965SvebsDYQ=&scope=basic
    5、授权成功后,参照帮助文档->REST API->API列表里的接口及示例调用
  • 相关阅读:
    关于data初始化值
    switch的优化替代写法
    phpstorm安装xdebug
    如何将一个列表封装为一个树形结构
    Win10系统桌面图标距离间距变大的问题
    cnpm无法加载文件的问题
    0、springboot
    1、springboot2新建web项目
    Game游戏分析
    netty学习
  • 原文地址:https://www.cnblogs.com/lhdre/p/8508968.html
Copyright © 2011-2022 走看看