• 百度网盘API调用一



    获取api_key
    api_key : GSccEhhbzxM4jKi5kqABPfwn
    secret_key : CDGOGIE8ZAIP3qooKbUpLpUrxnP2PUvo
    get:
    http://developer.baidu.com/rest/2.0/dev/v1/app/base/get?app_id=14512550&access_token=10.182e0fcde4fc1551180b8303cd35dcfd.1540223376.1183630

    1.在浏览器中输入:获取授权码:2220bc6cbf1dc533cce7968963f20c23
    https://openapi.baidu.com/oauth/2.0/authorize?response_type=code&client_id=GSccEhhbzxM4jKi5kqABPfwn&redirect_uri=oob


    3.通过刚刚新建应用的API Key获取device code和user_code
    curl -k -L -d "client_id=GSccEhhbzxM4jKi5kqABPfwn&response_type=device_code&scope=basic,netdisk" "https://openapi.baidu.com/oauth/2.0/device/code"
    {"device_code":"b4adab18f1ef0807d62cebddac2adea7","user_code":"u67xpvun","verification_url":"https://openapi.baidu.com/device","qrcode_url":"http://openapi.baidu.com/device/qrcode/0f274a778605dc24bae7dec0b612e5f9/u67xpvun","expires_in":1800,"interval":5}

    4.获取access_token:
    curl -k -L -d "grant_type=device_token&code=b4adab18f1ef0807d62cebddac2adea7&client_id=GSccEhhbzxM4jKi5kqABPfwn&client_secret=CDGOGIE8ZAIP3qooKbUpLpUrxnP2PUvo" "https://openapi.baidu.com/oauth/2.0/token"
    {"expires_in":2592000,"refresh_token":"27.4ce9e9aaa03764f915a19a754180e367.315360000.1855584874.2659222677-14512550","access_token":"26.773c43533edc9c14df1c58419a335cc7.2592000.1542816874.2659222677-14512550","session_secret":"5d7d9804b4c3ab764924ef8198edf593","session_key":"9m7YJ/56bOAlfLeTQi7/9fFV2OWXQOFWaBZ+VIvhJvz1GTtHaKk7WYRv6GHRPLtlLXl92/l5Sg1lK4yWpjM590j2FlVLe74iow8=","scope":"basic netdisk"}


    5.查看网盘配额:一下接口报错{"error_code":31024,"error_msg":"app id is empty","request_id":6842223964839647037}

    curl -k -L "https://pcs.baidu.com/rest/2.0/pcs/quota?method=info&access_token=26.773c43533edc9c14df1c58419a335cc7.2592000.1542816874.2659222677-14512550&client_id=GSccEhhbzxM4jKi5kqABPfwn"


    curl -k -L "https://pcs.baidu.com/rest/2.0/pcs/file?method=list&access_token=26.773c43533edc9c14df1c58419a335cc7.2592000.1542816874.2659222677-14512550&client_id=GSccEhhbzxM4jKi5kqABPfwn&client_secret=CDGOGIE8ZAIP3qooKbUpLpUrxnP2PUvo&path=/apps/pcsupload/"

  • 相关阅读:
    Exploits Likely Leveraged by Russia’s APT28 in Highly-Targeted Attack
    WAF绕过的一些总结和思考
    PHP SAFE MODE BYPASS
    RAS算法原理
    如何绕过WAF
    360手机助手关于签名校验的分析
    cat 命令详解
    面向对象简介
    APK签名及简单反编译
    面向对象之基本概念 封装、单多继承
  • 原文地址:https://www.cnblogs.com/gzu-link-pyu/p/9834028.html
Copyright © 2020-2023  润新知