Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Asana 帐户可以关联多封电子邮件,但从 API 获取用户仅返回 1 封电子邮件。那么它会返回哪一个呢?是否有主电子邮件的概念?
https://app.asana.com/api/1.0/users/me
好问题。用户在多个域中时通常有多个电子邮件地址。如果 API 调用具有域上下文,例如GET /workspaces/:id/users每个用户的电子邮件地址将是他们为所标识的工作区注册的域电子邮件。这适用于查询项目和任务的关注者,因为它们只能存在于单个域中。
GET /workspaces/:id/users
但是,当您的查询没有域上下文时,例如GET /users/me行为有点不确定。除非用户更改了该电子邮件地址,否则回复不会因呼叫而异,但是作为 API 使用者,您不能将“主要”电子邮件地址应用于该响应。
GET /users/me
希望有帮助。