Answered

how to download all files uploaded from typeform api

  • 4 January 2024
  • 9 replies
  • 118 views

I am using the token obtained by Developer apps through oauth2 authorization to use typeform's response API.

When I use the Download all files uploaded by respondents for a form API in the Responses API, when I use postman to test, the results returned are all 204. I don’t know where the zip file that should be downloaded is.

I am trying to use the API to download zip files. What I get is a 204 result instead of the 200 result mentioned in the document. I guess it may be related to the fact that no one in my form actually uploaded the file?

Similarly, when I use this api in my code file, I also do not get a buffer-like data stream.

Since I am not using the paid version, I cannot upload files for testing, but what I want to know is, if a user uploads a file, can I download the zip file in Postman?

I hope to get a reply as soon as possible, thank you

 

icon

Best answer by mathio 5 January 2024, 14:24

View original

9 replies

Userlevel 7
Badge +5

@mathio may be able to help with this!

@mathio may be able to help with this!

Thanks for the recommendation, but I'm sorry I don't have his contact information

Userlevel 7
Badge +5

Hello @niceyhu 

 

When I tried this request in postman (for my form) I received status 200 and a body with the ZIP file:

 

You should be able to save it as ZIP file to disk:

 

I was not able to replicate the 204 status (which means “no content”). Are you sure there are any uploaded files in your form? However even when there are not uploaded files I still receive an empty ZIP file for my request.

I am sorry but I can not provide any more help on this.

thanks @mathio  

Can I take a look at the content of your request header? In the request header of my actual request, there are only 7 parameters, but I see you have 8. I suspect that I have written one less request header?

here is my header

 

Userlevel 7
Badge +5

I only send the Authorization header with my personal token starting tfp_. Is it possible that the token you are using does not have correct scope? If it has correct scope and it still does not work, I suggest you contact our support (that endpoint might not have correct scope assigned for access).

 This is also a strange place @mathio 

When I checked the scope documentation, I found that there is no scope for this API, and there are only two scopes related to the response API.

Do you think that might be the reason? The access token obtained by oauth2 does not have the permission to download files?

 

Userlevel 7
Badge +5

Yes, it seems so. It might be intentional or an oversight. I suggest you contact our support, they will know more (if its and oversight they might get it fixed).

thank you so much sir @mathio 

Userlevel 7
Badge +5

Thanks for all the help, @mathio !

Reply