# Import file async API (v3) never finishes

**URL:** <https://community.hubspot.com/t/import-file-async-api-v3-never-finishes/42333>\
**Category:** APIs & Integrations\
**Tags:** cms-content, free\
**Created:** [August 14, 2021, 6:41pm UTC](https://community.hubspot.com/t/import-file-async-api-v3-never-finishes/42333 "2021-08-14T18:41:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![StaffG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/staffg/32/63860_2.png) [@StaffG](https://community.hubspot.com/u/StaffG)\
**Post date:** [August 14, 2021, 6:41pm UTC](https://community.hubspot.com/t/import-file-async-api-v3-never-finishes/42333/1 "2021-08-14T18:41:09Z")

</div>

Hi,  
I am having problems getting files

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

to work.  
I am trying to import a file from a URL (URL tested working from several different devices).  
I get a 202 from the request

`https://api.hubapi.com/files/v3/files/import-from-url/async`

with the following body:

```lia-code-sample
{
 "id":"AAAACg4_sPM",
 "links": {
 "status":"https://api-eu1.hubspot.com/files/v3/files/download-from- 
 url/AAAACg4_sPM/status"
 }
}

```

Which leads me to believe that the request I correct and I have the necessary permissions/scopes. However, calling the status link

`https://api.hubapi.com/files/v3/files/import-from-url/async/tasks/AAAACg4_sPM/status`

for updates on the status returns:

```lia-code-sample
{
 "completedAt":"2021-08-13T11:34:43.870Z",
 "startedAt":"2021-08-13T11:34:13.022Z",
 "links":{
 "status":"https://api-eu1.hubspot.com/files/v3/files/download-from-url/AAAACg5WIPc/status"
 },
 "taskId":"AAAACg4_sPM",
 "status":"PROCESSING"
}

```

Repeated requests to the same endpoint continue to return status PROCESSING for several minutes and eventually I get the response:

```lia-code-sample
{
 "status": "COMPLETE",
 "numErrors": 1,
 "errors": [
 {
 "status": "error",
 "category": "INTERNAL_SERVER_ERROR",
 "message": "Error downloading file: FAILED_UPLOAD"
 }
 ],
 "startedAt": "2021-08-13T09:59:12.955Z",
 "completedAt": "2021-08-13T10:39:30.738Z",
 "taskId": "AAAACg4_sPM"
}

```

And I am stuck. Can anyone help with that error message or point me in the right direction, I have searched the community and internet but not found anyone with a similar problem.  
Can I get more information about the error from HubSpot, some log or something?

I am using Oauth and and have succesfully obtained an accesstoken that is used in the request. The accesstoken is to a Test Account in this case but I have also tested it with a Free account with the same result. I have also tested uploading to the same account from the “playground” on the Files API documentation page with the same result.

Thanks in advance!  
Staff

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [August 16, 2021, 1:18pm UTC](https://community.hubspot.com/t/import-file-async-api-v3-never-finishes/42333/2 "2021-08-16T13:18:55Z")

</div>

@StaffG ,

Are you still experiencing this issue?

[@webdew](https://community.hubspot.com/t5/user/viewprofilepage/user-id/131510) have you seen anything like this?

---

<div class="post-metadata">

**Author:** ![StaffG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/staffg/32/63860_2.png) [@StaffG](https://community.hubspot.com/u/StaffG)\
**Post date:** [August 16, 2021, 4:27pm UTC](https://community.hubspot.com/t/import-file-async-api-v3-never-finishes/42333/3 "2021-08-16T16:27:56Z")

</div>

Yes, it still occurs. Tomorrow I will try with the sync version of upload as a workaround and to possibly give some more insight.

---

<div class="post-metadata">

**Author:** ![StaffG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/staffg/32/63860_2.png) [@StaffG](https://community.hubspot.com/u/StaffG)\
**Post date:** [August 25, 2021, 2:08pm UTC](https://community.hubspot.com/t/import-file-async-api-v3-never-finishes/42333/4 "2021-08-25T14:08:05Z")

</div>

Hi again,

I managed to solve this on our end. I believe that the “problem” was that we requested (refreshed) the access token between the upload of the file and the status request. When fixing our implementation of OAuth so it does not refresh the access token unnecesarily the problem went away.

It would be nice however if the error message said something about access token or that it was possible to see a log with more information to be able to trouble shoot API integrations better.

Closing with this as solution.

---

<div class="post-metadata">

**Author:** ![StaffG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/staffg/32/63860_2.png) [@StaffG](https://community.hubspot.com/u/StaffG)\
**Post date:** [August 25, 2021, 7:06pm UTC](https://community.hubspot.com/t/import-file-async-api-v3-never-finishes/42333/5 "2021-08-25T19:06:42Z")

</div>

I was misstaken in my previous post, the change we made that made it work again was that we changed from trying to upload to the root directory to instead upload to a named directory.
