# Asana API Question - Upload an Attachment (GDrive Subtype)

**URL:** <https://forum.asana.com/t/asana-api-question-upload-an-attachment-gdrive-subtype/1025246>\
**Category:** API & Developers\
**Tags:** make, attachments\
**Created:** [11 February 2025 19:08 UTC](https://forum.asana.com/t/asana-api-question-upload-an-attachment-gdrive-subtype/1025246 "2025-02-11T19:08:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaffaq\_Noor](https://luna1.co/8d76cd.png) [@Shaffaq\_Noor](https://forum.asana.com/u/Shaffaq_Noor)\
**Post date:** [11 February 2025 19:08 UTC](https://forum.asana.com/t/asana-api-question-upload-an-attachment-gdrive-subtype/1025246/1 "2025-02-11T19:08:42Z")

</div>

I am trying to use the **Upload an Attachment API call** to add a google drive attachment to a task. I tried testing the API call directly in the [Asana API Reference page](https://developers.asana.com/reference/createattachmentforobject) with the resource\_subtype set to gdrive but I received the following error message: `[403] Cannot upload attachment with resource\_subtype: gdrive’. Is this function just not supported yet or is this user error?

Here is the body of my API call  
Here is what I have in the body:

```auto
{
  "data": {
    "parent": "1208645560847085",
    "resource_subtype": "gdrive",
    "name": "Test Brief Doc",
      "url": "https://docs.google.com/spreadsheets/d/1sOckfv6ku-m0dadwoSh9w6wIJ9XJlMx9gYA3F7BKedE/edit?usp=drivesdk",
      "host": "google"
  }
}

```

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [11 February 2025 20:19 UTC](https://forum.asana.com/t/asana-api-question-upload-an-attachment-gdrive-subtype/1025246/2 "2025-02-11T20:19:21Z")

</div>

@John_Baldo @John_Vu I tried a number of variations of parameters as well and was unable to get a GoogleDrive type attachment to upload via the API:

```
        "error": "attachment_invalid_resource_subtype_on_creation",
        "message": "Cannot upload attachment with resource_subtype: gdrive"

```

Could you check on this and see if it is possible to do via the API, and the proper parameters to use? Thanks very much!

---

<div class="post-metadata">

**Author:** ![John\_Vu](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/john_vu/32/97235_2.png) [@John\_Vu](https://forum.asana.com/u/John_Vu)\
**Post date:** [19 February 2025 22:21 UTC](https://forum.asana.com/t/asana-api-question-upload-an-attachment-gdrive-subtype/1025246/3 "2025-02-19T22:21:27Z")

</div>

Thanks @Phil_Seeman for trying this out yourself.

I tried to reproduce this by:

1. Attaching a GDrive attachment to a task in the Asana UI/web app
2. Making a call to [Get attachments from an object (GET /attachments)](https://developers.asana.com/reference/getattachmentsforobject) with the task gid for the parent query param → grabbed the attachment gid of the GDrive attachment
3. Made a call to [Get an attachment (GET /attachments/{attachment\_gid})](https://developers.asana.com/reference/getattachment) endpoint to look up the GDrive attachment
4. Used the info from the last step as reference to attach the GDrive attachment using [Upload an attachment (POST /attachments)](https://developers.asana.com/reference/createattachmentforobject) endpoint
5. Ran into same error message as @Phil_Seeman

I asked around and it seems like this is not support via our API. I’ll see if I can find the team who owns this feature and ask for more details/put in feature request if it’s not supported.

---

<div class="post-metadata">

**Author:** ![Shaffaq\_Noor](https://luna1.co/8d76cd.png) [@Shaffaq\_Noor](https://forum.asana.com/u/Shaffaq_Noor)\
**Post date:** [27 February 2025 03:58 UTC](https://forum.asana.com/t/asana-api-question-upload-an-attachment-gdrive-subtype/1025246/4 "2025-02-27T03:58:15Z")

</div>

Hi John - thanks for the response. If there is a feature request for this, could you share it with me? It would be super helpful for some of my clients. Thanks!

---

<div class="post-metadata">

**Author:** ![John\_Vu](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/john_vu/32/97235_2.png) [@John\_Vu](https://forum.asana.com/u/John_Vu)\
**Post date:** [27 February 2025 18:13 UTC](https://forum.asana.com/t/asana-api-question-upload-an-attachment-gdrive-subtype/1025246/5 "2025-02-27T18:13:57Z")

</div>

Hi @Shaffaq_Noor, yes, I’ve already submitted a feature request for this.
