APIs & Integrations

ilir-test
Contributor

File ID when uploading

SOLVE

Hi HubSpot members,

 

I upload a file in the File Manager using:

https://developers.hubspot.com/docs/api/files/files

Endpoint: /files/v3/files/import-from-url/async

 

In the response I get id, but it is not the same id as the id of the file in File Manager!

 

Here is an example:

Id in the response of file upload: AAAADvor4Gc
Id in the File Manager: 64326721639

 

Because of this when I try to make an Engagement with a Contact or a Deal I get an error.

 

Any suggestions?

0 Upvotes
1 Accepted solution
webdew
Solution
Guide | Diamond Partner
Guide | Diamond Partner

File ID when uploading

SOLVE

Hi @ilir-test ,

Pass the id in get file api and you can get all the file details
in that see = https://prnt.sc/26k15na


Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regards. 

View solution in original post

3 Replies 3
webdew
Solution
Guide | Diamond Partner
Guide | Diamond Partner

File ID when uploading

SOLVE

Hi @ilir-test ,

Pass the id in get file api and you can get all the file details
in that see = https://prnt.sc/26k15na


Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regards. 

ilir-test
Contributor

File ID when uploading

SOLVE

Hi @webdew ,

 

Thank you for taking the time to answer, but the whole point was that when uploading the file through 

https://developers.hubspot.com/docs/api/files/files and the endpoint: /files/v3/files/import-from-url/async , I do not get the correct file id in response!

 

Because of that I cannot pass the file id when I make an Engagement.

 

But your answer made me research more and I found out that after uploading the file I can check the status of the uploaded file with this endpoint: /files/v3/files/import-from-url/async/tasks/{taskId}/status , where I can get the file id and url in the response.

ilirtest_0-1643276575439.png

 

So I will accept your answer as a solution, although what I was exactly looking was something else.

 

Thank you and all the best,

Ilir

 

0 Upvotes
ilir-test
Contributor

File ID when uploading

SOLVE

I do not see another way to retrieve the file id other than when it gets uploaded, any ideas?

0 Upvotes