Active Collab send Email after User create

人走茶凉 提交于 2019-12-11 07:17:01

问题


I'am using the Active Collab API V5 to create User from our Service Desk - the creation of the User with the following POST works.

curl -k -v -h "Content-Type:application/json" -h "X-Angie-AuthApiToken:XXXXXXX" -X POST -d '{"type": "Member","email": "XXXXXXXX@XXXXXX", "password": "XXXXX"}' https://URL/api/v1/users

Is it possible to send the invite link automatically? Like the User creation on the web interface (Send invite link from People page).

I found this API Reference https://developers.activecollab.com/api-documentation/v1/people/users/invite.html but on this way its only possible to invite directly to projects.


回答1:


System makes a distinction between account creation, and invitiation (which includes account creation, but does a bit more). Here's how to invite one user or more users:

curl -h "Content-Type:application/json" \
     -h "X-Angie-AuthApiToken:XXXXXXX" \
     -X POST -d '{"role": "Member","email_addresses": ["X@Y.COM", "Y@X.com"], "custom_permissions": ["can_manage_projects", "can_manage_finances"]}' \
      https://URL/api/v1/users/invite

Differences:

  • API end-point is different (/api/v1/users/invite),
  • Use role instead of type,
  • A list of more than one email address can be specified,
  • Custom permissions can be set,
  • You can't specify user's password. They will receive invitation email, and complete the process themselves.


来源:https://stackoverflow.com/questions/47353613/active-collab-send-email-after-user-create

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!