APIs & Integrations

Fredito
Participant | Platinum Partner
Participant | Platinum Partner

files folder bad request error 400

Hi, 

I trying to use differents files API.
I always have the same issue trying to upload files using /files/v3/files (bad request 400) so I got back to basics with

files/v3/folders/{folderPaht}

This last try works well from the hubspot test API tools but when I run it from postman, 400 again. It is a really simple call and I've got exatcly the sames parameters.

turning cray, any help would be great 🙂

0 Upvotes
2 Replies 2
Jaycee_Lewis
Community Manager
Community Manager

files folder bad request error 400

Hi, @Fredito 👋 Can you share any additional details? Sharing how your requests are set up is one easy way to give the community more to work with.

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
Fredito
Participant | Platinum Partner
Participant | Platinum Partner

files folder bad request error 400

thx @Jaycee_Lewis 
so here are some details :

this
 
curl --request GET \
--url https://api.hubapi.com/files/v3/folders/uploadedfiles \
--header 'authorization: Bearer YOUR_ACCESS_TOKEN'
works fine in the api developpement documenation tool and send this response :

HTTP 200

{
"id": "60289114066",
"createdAt": "2023-01-23T14:26:00.493Z",
"updatedAt": "2023-01-23T14:26:00.616Z",
"archived": false,
"name": "uploadedfiles",
"path": "/uploadedfiles"
}

 

When I try to make exactly the same in Postman

curl --location --request GET 'https://api.hubapi.com/files/v3/folders/uploadedfiles' \
--header 'authorization: Bearer YOUR_ACCESS_TOKEN'
the response is 
<html>
<head>
    <title>400 Bad Request</title>
</head>
<body>
    <center>
        <h1>400 Bad Request</h1>
    </center>
    <hr>
    <center>cloudflare</center>
</body>
</html>

 

0 Upvotes