Inviting new user to private channel after inviting him by Slack API -
i invited new user slack team using slack api method users.admin.invite
. need join him public , private channels. channels gave params in inviting request, private channels have trouble. not channels , have method join user it. method groups.invite
need userid join him. possible add user in slack private channels (groups) using slack api?
the undocumented api method users.admin.invite
has channels
property, can specify list of ids channels want new user automatically invited to.
this works private channels (i tested confirm). need specify private channel id instead, start g
instead of c
.
you can use api method groups.list
correct private channel id. (private channels called groups in slack api)
example request:
https://slack.com/api/users.admin.invite?token=token&email=name@example.com&channels=g12345678
if still getting errors using approach due other issues, e.g. slack not recognize email address or access token not have admin right.
for more details please see unofficial documentation of users.admin.invite
on github, have updated accordingly.
Comments
Post a Comment