A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
Like other objects in the system, users are referred to by numerical IDs. However, the special string identifier me
can be used anywhere a user ID is accepted, to refer to the current authenticated user (e.g, GET /users/me
).
UserCompact
A Compact
object reflects the default fields returned after a successful API request. See input/output options to include more fields in the response.
Property | Type | Description |
---|---|---|
gid | string | Globally unique identifier of the resource, as a string. |
resource_type | string | The base type of this resource. |
name | string | Read-only except when same user as requester. The user’s name. |
{
"gid": "12345",
"resource_type": "user",
"name": "Greg Sanchez"
}
User
Property | Type | Description |
---|---|---|
gid | string | Globally unique identifier of the resource, as a string. |
resource_type | string | The base type of this resource. |
email | string(email) | The user's email address. |
name | string | Read-only except when same user as requester. The user’s name. |
photo | object¦null | A map of the user’s profile photo in various sizes, or null if no photo is set. Sizes provided are 21, 27, 36, 60, 128, and 1024. All images are in PNG format, except for 1024 (which is in JPEG format). |
photo .image_1024x1024 | string(uri) | none |
photo .image_128x128 | string(uri) | none |
photo .image_21x21 | string(uri) | none |
photo .image_27x27 | string(uri) | none |
photo .image_36x36 | string(uri) | none |
photo .image_60x60 | string(uri) | none |
workspaces | [object] | Workspaces and organizations this user may access. Note: The API will only return workspaces and organizations that also contain the authenticated user. |
» {} .gid | string | Globally unique identifier of the resource, as a string. |
» {} .resource_type | string | The base type of this resource. |
» {} .name | string | The name of the workspace. |
{
"gid": "12345",
"resource_type": "user",
"email": "[email protected]",
"name": "Greg Sanchez",
"photo": {
"image_1024x1024": "https://...",
"image_128x128": "https://...",
"image_21x21": "https://...",
"image_27x27": "https://...",
"image_36x36": "https://...",
"image_60x60": "https://..."
},
"workspaces": [
{
"gid": "12345",
"resource_type": "workspace",
"name": "My Company Workspace"
}
]
}