Comments

4 comments

  • Pavel Bobek

    Still stucked within downloading direct links result not into file but into:
    code: 400
    message: Bad Request
    response headers:
    Server: nginx
    Date: Thu, 29 Jun 2023 12:42:19 GMT
    Content-Type: text/html
    Content-Length: 1653
    x-envoy-upstream-service-time: 65
    X-Box-Original-Ingress-ADC-Host: prod-c-traffic-manager-ttk5
    Strict-Transport-Security: max-age=31536000
    Via: 1.1 google
    Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
    response content:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
      <title>Box - Free Online File Storage, Internet File Sharing, RSS Sharing, Access Documents &amp; Files Anywhere, Backup Data, Share Files</title>
      <style type="text/css">
    body, html {height: 100%;}
     
    body
    {
    margin: 0;
    padding: 0;
    background: #F8FEFE url(img/linear_g.gif) left top repeat-x;
    font-family: Arial;
    }
     
    div.outer
    {
    height: 100%;
    overflow: visible;
    }
     
    div.content
    {
    top: 40%;
    position: relative;
    }
     
    div.error_box
    {
    top: -80px;
    position: relative;
    /*width: 510px;*/
    margin: auto;
    text-align: center;
    }
     
    div.error_box img
    {
    border: 0;
    }
     
    div.error_box div.message
    {
    margin: 50px auto 0 auto;
    padding-top: 10px;
    font-size: 12px;
    color: #489BD9;
    width: 510px;
    line-height: 20px;
    text-align: center;
    }
     
    div.error_box div.message a
    {
    text-decoration: none;
    color: #489BD9;
    background: url(img/blue3_1px.gif) left bottom repeat-x;
    }
     
      </style>
    </head>
     
    <body>
      <div class="outer">
     
        <div class="content">
          <div class="error_box">
            <a href="http://www.box.com" onmousedown="return false;"><img src="img/logo150.png" alt="Box.com"/></a>
            <div class="message" >
    We are not currently able to process your request; please try again in a few minutes.<br />
    If you continue having issues, please submit a request at <a href="https://support.box.com">https://support.box.com</a> for support.
            </div>
    </div>
        </div>
      </div>
     
     </body>
     
    </html>

     

    0
    Comment actions Permalink
  • Rona

    Hi Pavel, 

    Welcome to Box Community and glad to help! 

    To have your direct link to work, 

    Hope it works! 

    1
    Comment actions Permalink
  • Pavel Bobek

    Hi Rona,

    This is not my case.

    I am developing Java application that is capable to download files from direct links provided by 3rd party.
    Endpoint https://public.boxcloud.com/d/1/<filetoken>/download has some private policy which prevent GET request for the files with message: We are not currently able to process your request; please try again in few minutes. If you continue having issues, please submit a request at <a href="https://support.box.com">https://support.box.com</a> for support.
    I am looking for an advice how to construct HttpClient which is capable to communicate with mentioned endpoint.

    0
    Comment actions Permalink
  • Pavel Bobek

    After several retries and tests i was able to resolved the issue.

    Solution is: Force "Accept-Encoding" header to request with "gzip, deflate, br" value to the request.

    0
    Comment actions Permalink

Please sign in to leave a comment.