APIs & Integrations

bulbul
Member

Getting 403 status code while uploading or reading files using Api

SOLVE

Hi, 

I am getting 403 status code while uploading or reading files/folders using Api.  Could anybody please let me know, what are the prerequisites  for file releted apis,

 

Thanks,

 Bulbul

0 Upvotes
1 Accepted solution
bulbul
Solution
Member

Getting 403 status code while uploading or reading files using Api

SOLVE

I was missing 'file' scope, thank you for the reply

View solution in original post

0 Upvotes
3 Replies 3
Willson
HubSpot Employee
HubSpot Employee

Getting 403 status code while uploading or reading files using Api

SOLVE

Hey @bulbul 

 

To confirm, this is a 403 Forbidden error. This is returned when the authentication provided does not have the proper permissions to access the specific URL.

 

As an example, an OAuth token that only has content access would get a 403 when accessing the Deals API (which requires contacts access). In this case, the OAuth token or API key being used does not have the proper access to the endpoint you're attempting to hit. 

 

Could you confirm which endpoint you're hitting and which method of authentication you're using? Thanks!

Product Manager @ HubSpot
0 Upvotes
bulbul
Solution
Member

Getting 403 status code while uploading or reading files using Api

SOLVE

I was missing 'file' scope, thank you for the reply

0 Upvotes
bulbul
Member

Getting 403 status code while uploading or reading files using Api

SOLVE

Thank You Very much for the reply. 

 

I am using OAuth token and hitting following api : POST /filemanager/api/v2/files.

 

Please let me know from where I can grant the required permission

0 Upvotes