Python script: download a file submited in a Hubspot form

Nouveau contributeur

Hello everyone,

 

I've been developing a python routine able to interpret new emails from Hubspot forms and download the files submitted through the form. What I need to do is to use the URL from the hubspot email that I receive in my mailbox and open it (see code below). This was working until the recent forms update. Can you please help me identify what I need to change so this works again?

Hubspot_email_download_file.PNG

 

Thank you very much.

Répondre
0 Vote / Votes
1 Réponse
Highlighted
Salarié HubSpot

Just tested it out, and I think the URL in the email should exactly correspond to the request URL required for this new endpoint: https://developers.hubspot.com/docs/methods/form-integrations/v1/uploaded-files/signed-url-redirect

 

So what that means is that you just need to authenticate your GET request.

 

You could add your portal HAPI key as a query string to the request URL, or otherwise create an app add the OAuth2 flow to your python code.

Répondre
0 Vote / Votes