# How can I construct the URL for a task in My Tasks?

**URL:** <https://forum.asana.com/t/how-can-i-construct-the-url-for-a-task-in-my-tasks/28862>\
**Category:** API & Developers\
**Tags:** my-tasks, api\
**Created:** [15 August 2018 19:30 UTC](https://forum.asana.com/t/how-can-i-construct-the-url-for-a-task-in-my-tasks/28862 "2018-08-15T19:30:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Standefer](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ben_standefer/32/21173_2.png) [@Ben\_Standefer](https://forum.asana.com/u/Ben_Standefer)\
**Post date:** [15 August 2018 19:30 UTC](https://forum.asana.com/t/how-can-i-construct-the-url-for-a-task-in-my-tasks/28862/1 "2018-08-15T19:30:38Z")

</div>

I’m trying to build an integration that provides a link to a task a user has added in My Tasks. As discussed in [Getting a user's "My Tasks" Project ID](https://forum.asana.com/t/getting-a-users-my-tasks-project-id/25514), My Tasks is a built-in “project”, and the project ID My Tasks isn’t exposed by the API.

If you call /tasks with opt\_fields=projects.id, you will see that tasks in My Tasks have no project. Example request:  
GET [https://app.asana.com/api/1.0/tasks?workspace=workspace-id&assignee=me&opt\_fields=projects.id&limit=20](https://app.asana.com/api/1.0/tasks?workspace=workspace-id&assignee=me&opt_fields=projects.id&limit=20)

So, how can I construct (or request) the URL for a task in My Tasks? I tried seeing if there was an undocumented `url` field on tasks (i.e. /tasks?opt\_fields=url) but there is not. I’m able to construct a URL for tasks in projects, but I’m not able to construct a URL for tasks that are only in My Tasks.

---

<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:** [15 August 2018 19:53 UTC](https://forum.asana.com/t/how-can-i-construct-the-url-for-a-task-in-my-tasks/28862/2 "2018-08-15T19:53:39Z")

</div>

> [@Ben\_Standefer](#):
>
> but I’m not able to construct a URL for tasks that are only in My Tasks

If you construct a URL that looks like this:  
`https://app.asana.com/0/0/{taskID}`  
and that task exists only in My Tasks, then in my testing when that URL is executed, Asana replaces the second “0” with the Project ID of “My Tasks” and displays that task in the My Tasks view.

---

<div class="post-metadata">

**Author:** ![Ben\_Standefer](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ben_standefer/32/21173_2.png) [@Ben\_Standefer](https://forum.asana.com/u/Ben_Standefer)\
**Post date:** [15 August 2018 20:28 UTC](https://forum.asana.com/t/how-can-i-construct-the-url-for-a-task-in-my-tasks/28862/4 "2018-08-15T20:28:49Z")

</div>

Oh sweet, will give that a try. Thanks!

It’s probably better for your API than the \<user-id+1\> looping hack mentioned here: [Programmatically attach user object in notes field](https://forum.asana.com/t/programmatically-attach-user-object-in-notes-field/17060/3) I got the loop hack working but will replace the hack with this.

---

<div class="post-metadata">

**Author:** ![Ben\_Standefer](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ben_standefer/32/21173_2.png) [@Ben\_Standefer](https://forum.asana.com/u/Ben_Standefer)\
**Post date:** [15 August 2018 20:34 UTC](https://forum.asana.com/t/how-can-i-construct-the-url-for-a-task-in-my-tasks/28862/5 "2018-08-15T20:34:33Z")

</div>

This works, but there is one downside. My app stores various canonical URLs in a table, and the competing URL formats lead to 2 records when I really just want a single record:  
[https://app.asana.com/0/{projectId}/{taskId}](https://app.asana.com/0/%7BprojectId%7D/%7BtaskId%7D)  
[https://app.asana.com/0/0/{taskId}](https://app.asana.com/0/0/%7BtaskId%7D)

It would still make the most sense to provide `/tasks?opt_fields=url` to get the URL for a task. Thanks for your help.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:05 UTC](https://forum.asana.com/t/how-can-i-construct-the-url-for-a-task-in-my-tasks/28862/6 "2025-05-30T19:05:09Z")

</div>

Closed on 30 May 2025 19:05 UTC


