Missing "Response_id" and "Field_id" in the "retrieve response file api". | Community
Skip to main content
Question

Missing "Response_id" and "Field_id" in the "retrieve response file api".


Forum|alt.badge.img

Hi, I am testing the APIs but I am unable to find anything related to these terms; “Response_id”, “Field_id” and “filename” from the documentation. 

The Url 

https://api.typeform.com/forms/{form_id}/responses/{response_id}/fields/{field_id}/files/{filename}

Kindly guide me from where should i fill the required ids?

10 replies

Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14858 replies
  • July 12, 2021

Hi again, @Sibqo ! You can first find this information when making this call here. Then, in the JSON, you’ll find the information you’re looking for. :grin: Let me know if you have any troubles finding that information after making that call!

 


Forum|alt.badge.img
  • Author
  • Explorer
  • 8 replies
  • July 15, 2021

I have run the request https://developers.typeform.com/responses/reference/retrieve-responses/

but still I am not getting any “response_id” and “field_id” in the response of the respective call.


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14858 replies
  • July 15, 2021

Hi @Sibqo If you feel comfortable doing so, can you paste one of the responses from that call here? I can then highlight where to find this info. 


Forum|alt.badge.img
  • Author
  • Explorer
  • 8 replies
  • July 16, 2021

the attached screenshot is of call “retrieve responses”

 


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14858 replies
  • July 20, 2021

Hi @Sibqo Apologies for the delay - do you mind sharing the screenshot again? It didn’t seem to attach. :( 


Forum|alt.badge.img
  • Author
  • Explorer
  • 8 replies
  • July 26, 2021

 


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14858 replies
  • July 26, 2021

Hi @Sibqo thank you! Has this form collected any results? 


Forum|alt.badge.img
  • Author
  • Explorer
  • 8 replies
  • July 27, 2021

Thankyou so much. your guidelines are really helpful for mein resolving the call issue. 


Liz
Community Team
Forum|alt.badge.img+5
  • Tech Community Advocate
  • 14858 replies
  • July 27, 2021

Glad to hear! Let us know if we can help answer anything else, @Sibqo . :grinning:


picsoung
Typeform
Forum|alt.badge.img+5
  • Developer Advocate @ Typeform
  • 384 replies
  • August 10, 2021

Hi @Sibqo 

To follow up for anybody that would have the same issue.

If you want to retrieve a file that has been uploaded via your typeform you need to use the Retrieve Response File endpoint.

To call this endpoint you would need few things:

  • form_id, it’s your typeform id, its the 8 characters string in the url usually after “/to/”. example: https://kiki.typeform.com/to/KKS7qMpL
  • response_id, is the id of this specific response, you will find either in the Responses API or the webhook payload
  • field_id, the id of the question field that is a file upload. You can get either via the Responses API or by looking at the form definition of your form https://api.typeform.com/to/{id_of_your_form}
     

But you should not this to create this URL manually, as the Responses API and the webhook payload both give you directly the response in the form of
 

{
  "field": {
    "id": "jrWzekvzk2O9",
    "ref": "f5a13563-adc0-4710-ac2b-dbc2a601743d",
    "type": "file_upload"
  },
  "type": "file_url",
  "file_url": "https://api.typeform.com/forms/DqvzRJgo/responses/x9o9y1iw3fellcmr379e9x9o9y1iwt3c/fields/jrWzekvzk2O9/files/3417a2798f67-_wunexf.jpg"
}

And you can just extract `file_url` and call directly this url via an authenticated call.

Hope it helps


Reply