CUrl download result image from typeform results in log in page











up vote
0
down vote

favorite












I'm rather new at using either curl or the typeform API, so not just anwsers are appreciated but also any links or tutorials to help me on my way.



The problem I am facing is that when I try to get my uploaded image on typeform using either curl or wget, it does not save the image but rather the log in page from typeform



https://admin.typeform.com/login/



Recovering the download link itself using the API works fine.
I used the command




curl --request GET --url https://api.typeform.com/forms/aLsAcC/responses --header 'Authorization: Bearer {MyId}'




This wil return a JSON object with all responses. Inside this JSON file is the following block :



"field":{  
"id":"SM3co23sAfCQ",
"type":"file_upload",
"ref":"2953330e-3c0b-4da3-bbb1-78a370152b10"
},
"type":"file_url",
"file_url":"https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download"


But then when I try to actually download the file it doesn't seem to work.
It doesn't matter if I run :



curl -O https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download

curl --request GET --url https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download --header 'Authorization: Bearer {MyId}'
or
wget https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download


It always seems to give the same result.



<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url=https://admin.typeform.com/login/" />

<title>Redirecting to https://admin.typeform.com/login/</title>
</head>
<body>
Redirecting to <a href="https://admin.typeform.com/login/">https://admin.typeform.com/login/</a>.
</body>
</html>


Wich is simply the login page from the site.



The weird thing is that when I use my browser itself it works just fine, so I suspect I am missing some form of authentication. It's probably a very simple problem, but google didn't really help on that front.



So my question is, how do I download the response image. It doesn't matter if the final solution does not use curl, but a commandline tool or library is a must.



Thanks.










share|improve this question


























    up vote
    0
    down vote

    favorite












    I'm rather new at using either curl or the typeform API, so not just anwsers are appreciated but also any links or tutorials to help me on my way.



    The problem I am facing is that when I try to get my uploaded image on typeform using either curl or wget, it does not save the image but rather the log in page from typeform



    https://admin.typeform.com/login/



    Recovering the download link itself using the API works fine.
    I used the command




    curl --request GET --url https://api.typeform.com/forms/aLsAcC/responses --header 'Authorization: Bearer {MyId}'




    This wil return a JSON object with all responses. Inside this JSON file is the following block :



    "field":{  
    "id":"SM3co23sAfCQ",
    "type":"file_upload",
    "ref":"2953330e-3c0b-4da3-bbb1-78a370152b10"
    },
    "type":"file_url",
    "file_url":"https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download"


    But then when I try to actually download the file it doesn't seem to work.
    It doesn't matter if I run :



    curl -O https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download

    curl --request GET --url https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download --header 'Authorization: Bearer {MyId}'
    or
    wget https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download


    It always seems to give the same result.



    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8" />
    <meta http-equiv="refresh" content="0;url=https://admin.typeform.com/login/" />

    <title>Redirecting to https://admin.typeform.com/login/</title>
    </head>
    <body>
    Redirecting to <a href="https://admin.typeform.com/login/">https://admin.typeform.com/login/</a>.
    </body>
    </html>


    Wich is simply the login page from the site.



    The weird thing is that when I use my browser itself it works just fine, so I suspect I am missing some form of authentication. It's probably a very simple problem, but google didn't really help on that front.



    So my question is, how do I download the response image. It doesn't matter if the final solution does not use curl, but a commandline tool or library is a must.



    Thanks.










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm rather new at using either curl or the typeform API, so not just anwsers are appreciated but also any links or tutorials to help me on my way.



      The problem I am facing is that when I try to get my uploaded image on typeform using either curl or wget, it does not save the image but rather the log in page from typeform



      https://admin.typeform.com/login/



      Recovering the download link itself using the API works fine.
      I used the command




      curl --request GET --url https://api.typeform.com/forms/aLsAcC/responses --header 'Authorization: Bearer {MyId}'




      This wil return a JSON object with all responses. Inside this JSON file is the following block :



      "field":{  
      "id":"SM3co23sAfCQ",
      "type":"file_upload",
      "ref":"2953330e-3c0b-4da3-bbb1-78a370152b10"
      },
      "type":"file_url",
      "file_url":"https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download"


      But then when I try to actually download the file it doesn't seem to work.
      It doesn't matter if I run :



      curl -O https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download

      curl --request GET --url https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download --header 'Authorization: Bearer {MyId}'
      or
      wget https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download


      It always seems to give the same result.



      <!DOCTYPE html>
      <html>
      <head>
      <meta charset="UTF-8" />
      <meta http-equiv="refresh" content="0;url=https://admin.typeform.com/login/" />

      <title>Redirecting to https://admin.typeform.com/login/</title>
      </head>
      <body>
      Redirecting to <a href="https://admin.typeform.com/login/">https://admin.typeform.com/login/</a>.
      </body>
      </html>


      Wich is simply the login page from the site.



      The weird thing is that when I use my browser itself it works just fine, so I suspect I am missing some form of authentication. It's probably a very simple problem, but google didn't really help on that front.



      So my question is, how do I download the response image. It doesn't matter if the final solution does not use curl, but a commandline tool or library is a must.



      Thanks.










      share|improve this question













      I'm rather new at using either curl or the typeform API, so not just anwsers are appreciated but also any links or tutorials to help me on my way.



      The problem I am facing is that when I try to get my uploaded image on typeform using either curl or wget, it does not save the image but rather the log in page from typeform



      https://admin.typeform.com/login/



      Recovering the download link itself using the API works fine.
      I used the command




      curl --request GET --url https://api.typeform.com/forms/aLsAcC/responses --header 'Authorization: Bearer {MyId}'




      This wil return a JSON object with all responses. Inside this JSON file is the following block :



      "field":{  
      "id":"SM3co23sAfCQ",
      "type":"file_upload",
      "ref":"2953330e-3c0b-4da3-bbb1-78a370152b10"
      },
      "type":"file_url",
      "file_url":"https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download"


      But then when I try to actually download the file it doesn't seem to work.
      It doesn't matter if I run :



      curl -O https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download

      curl --request GET --url https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download --header 'Authorization: Bearer {MyId}'
      or
      wget https://admin.typeform.com/form/aLsAcC/field/SM3co23sAfCQ/results/1a4a6ab57b29-IMG_0354.JPG/download


      It always seems to give the same result.



      <!DOCTYPE html>
      <html>
      <head>
      <meta charset="UTF-8" />
      <meta http-equiv="refresh" content="0;url=https://admin.typeform.com/login/" />

      <title>Redirecting to https://admin.typeform.com/login/</title>
      </head>
      <body>
      Redirecting to <a href="https://admin.typeform.com/login/">https://admin.typeform.com/login/</a>.
      </body>
      </html>


      Wich is simply the login page from the site.



      The weird thing is that when I use my browser itself it works just fine, so I suspect I am missing some form of authentication. It's probably a very simple problem, but google didn't really help on that front.



      So my question is, how do I download the response image. It doesn't matter if the final solution does not use curl, but a commandline tool or library is a must.



      Thanks.







      curl typeform






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 22 at 12:43









      B. Dereij

      133




      133





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53431305%2fcurl-download-result-image-from-typeform-results-in-log-in-page%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53431305%2fcurl-download-result-image-from-typeform-results-in-log-in-page%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Trompette piccolo

          Slow SSRS Report in dynamic grouping and multiple parameters

          Simon Yates (cyclisme)