How to get Comment's attachments using api

Hi Greetings,

i’ve stuck in a problem, i need your help asap please.

Asana api is allowing me to get attachments via task id. thats fine.
but i want to get those attachments which are under some comment.
How can i get attachments using comment id, or let me know any solution please.


I think there’s absolutely no method to get that information. The document added with the comment is in the attachments collection as any other comment, and there’s no property to tell that it was added with the comment.

Even in the stories, you see that the comment have been added, but there’s NO story for that document being added to the task !! (I think it’s a bug Asana should fix…)

There’s one solution you can try, but it’s not 100% accurate, but it can help if you need to link a comment with a document…

Look at the “created_at” of that document, + “create_at” of stories.

If you find a story that is added less than 10 seconds from a document, you can suppose that they were added simultaneously… ???

I just did a test, and there was less than 1 second between both.
attachment: “created_at”:
comment (stories): “created_at”:

But, look at my sample, the difference between them is 6 seconds !!! That’s very long…
I’m not sure you can use it, but you can try !


@Frederic_Malenfant, I think you’re 100% correct. It came up before here:

@Ross_Grambo or @AndrewWong, do you know why in the Asana UI, we can see an attachment on a comment but in the API, there’s seemingly no linkage available between attachment and story?


we need the information via API what attachement is added to what comment by comment ID, too.

since Asana have allowed adding attachments to comments just some month ago, Asana has not updated their API yet.
so that is something like a bug showing these attachements belonging to the task (when asking the API about attachments for tasks).

thanks for any message.