Python script: download a file submited in a Hubspot form


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?



Thank you very much.

1 Reply 1
HubSpot Employee

Just tested it out, and I think the URL in the email should exactly correspond to the request URL required for this new endpoint:


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.