<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # 開放應用服務模式 本開發攻略介紹開放服務模式下獲取Access Token的授權驗證,獲取Access Token前請先獲取商戶Code。 [TOC=2,3] ## 獲取商戶Code 地址:`https://open-api.10ss.net/oauth/authorize` 請求方式:GET 應用授權URL拼裝 ~~~ https://open-api.10ss.net/oauth/authorize?response_type=code&client_id=2015101400445465&redirect_uri=http%3A%2F%2Fexample.com&state=1 ~~~ |名 稱|類 型|描 述| |----|----|----| |client_id|string|易聯云頒發給開發者的應用ID 非空值| |response_type|string|授權類型,固定參數為“code”,表示授權碼模式| |redirect_uri|string|開發者自身的回調地址 (需要urlencode)| |state|string|用于保持請求和回調的狀態,在回調時,會回傳該參數。開發者可以用這個參數驗證請求有效性,也可以記錄用戶請求授權頁前的位置。可防止CSRF攻擊| 商戶授權成功后,pc或者手機客戶端會跳轉至開發者定義的回調頁面(即redirect_uri參數對應的url),在回調頁面請求中會帶上當次授權的授權碼code和開發者的state(code有效期600秒,超時無效)示例如下: ~~~ redirect_uri?response_type=code&code=xxxx&state=xxxx ~~~ ## 使用Code換取Access Token 地址:`https://open-api.10ss.net/oauth/oauth` [境外地址](apiprotocol.md) 請求方式:POST **所需參數(獲取access_token并授權終端)** |名 稱|類 型|描 述| |----|----|----| |client_id|string|易聯云頒發給開發者的應用ID 非空值| |grant_type|string|授與方式(固定為 “authorization_code”)| |sign|string|簽名 詳見API文檔列表-[接口簽名](apiprotocol.md)| |code|string|授權碼code | |scope|string|授權權限,傳all| |timestamp|int|當前服務器時間戳(10位)| |id|string|UUID4 詳見API文檔列表-[uuid4](apiprotocol.md)| ## 使用Refresh Token更新Access Token 地址:`https://open-api.10ss.net/oauth/oauth` 請求方式:POST 所需參數 每臺終端的Access Token更新頻次限制: 20次/日 注意:通過Refresh Token刷新憑證時,由于不可抗力原因,導致接收返回失敗,無法得到最新的憑證信息,影響打印。兩個小時內使用原有舊Refresh Token 調用API會獲得上次的返回結果! |名 稱|類 型|描 述| |----|----|----| |client_id|string|易聯云頒發給開發者的應用ID 非空值| |grant_type|string|授與方式(固定為 “refresh_token”)| |scope|string|授權權限,傳all| |sign|string|簽名 詳見API文檔列表-[接口簽名](apiprotocol.md)| |refresh_token|string|更新access_token所需| |id|string|UUID4 詳見API文檔列表-[uuid4](apiprotocol.md)| |timestamp|int|當前服務器時間戳(10位)| ## 同步響應參數說明 每臺打印機都有唯一的access_token.請開發者做好存儲。 |名 稱|類 型|描 述| |----|----|----| |access_token|string|訪問令牌,API調用時需要,在令牌有效期內可以重復使用,請開發者全局保存| |refresh_token|string|更新access_token所需,有效時間35天| |expires_in|int|令牌的有效時間,單位秒 (30天)| |machine_code|string|易聯云終端號| 示例如下: ~~~ {'error':'0','error_description':'success','body':{'access_token':'xxxx','refresh_token':'xxxx','machine_code':'xxxx','expires_in':2592000,'scope':'all'}} {"error":"2","error_description":"client_id不存在"} {'error':'11', 'error_description':'sign驗證失敗'}, {'error':'12', 'error_description':'缺少必要參數'}, {'error':'15','error_description':'權限不能大于初次授權的權限'} {'error':'19', 'error_description':'應用未上架或已下架'}, {'error':'33', 'error_description':'Uuid不合法'}, {'error':'41', '獲取或更新access_token的次數,已超過最大限制次數!'}, ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看