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.
curl typeform
add a comment |
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.
curl typeform
add a comment |
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.
curl typeform
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
curl typeform
asked Nov 22 at 12:43
B. Dereij
133
133
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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