Create a tag in Asana using python

import asana

result = client.tags.create_tag({‘field’: ‘value’, ‘field’: ‘value’}, opt_pretty=True)

//body parameter

{
“data”: {
“color”: “light-green”,
“followers”: [
“12345”,
“42563”
],
“name”: “hub-acc-[FirstName][LastName]”,
“workspace”: “12345”
}
}

//201 Response

{
“data”: {
“gid”: “12345”,
“resource_type”: “tag”,
“color”: “light-green”,
“followers”: [
{
“gid”: “12345”,
“resource_type”: “user”,
“name”: “Rahul Kumar”
}
],
“name”: “hub-acc-[FirstName][LastName]”,
“permalink_url”:
“workspace”: {
“gid”: “12345”,
“resource_type”: “workspace”,
“name”: “Rahul Kumar”
}
}
}

Can you help me and edit the correct code with this please^^

@Bel1 - please edit your posts to remove those access tokens immediately! By posting them here, you’ve just given the whole world total access to all of your Asana data!

1 Like