APIs & Integrations

ShaunWing
Member

Struggling to download a pdf uploaded from a form via the Rest API

Hi there I am stuggling to grab a pdf or word doc or picture via the rest api 

 

it says that I should do curl " -L "https://api.hubapi.com/form-integrations/v1/uploaded-files/signed-url-redirect/20128659661?portalId=...""

 

this works for the txt 

 

when I do this for the pdf or any other uploaded doc it returns html 

 

has anyone figured this out?

0 Upvotes
2 Replies 2
ShaunWing
Member

Struggling to download a pdf uploaded from a form via the Rest API

Ahh I missed the hapikey , but now i get this error 
 
{
"status": "error",
"message": "Request implies conflicting values for hub-id: ******* from [query string parameter (portalId=*****)] vs. 9087653 from hapikey (*****************)",
"correlationId": "***************"
}
0 Upvotes
ShaunWing
Member

Struggling to download a pdf uploaded from a form via the Rest API

When I simulate this in postman It does the same thing and redirects me to the Checking browser page 

 

maybe an auth header is incorrect?

 

Screen Shot 2021-02-26 at 09.13.55.png