'how to export slack users email as json
I exported slack team users for migrating to another chat server like rocket.chat. and I used the export option in slack but couldn't find the email in the json data? How can I find the email? This is the correct API for slack exported json data
this is my exported slack users json data which i couldn't fine the email from
Solution 1:[1]
Take a look at the Slack users.list API. It's a JSON API and the method response includes email addresses.
In fact, if you only need to do this once, you can just use the 'tester' page: https://api.slack.com/methods/users.list/test
Solution 2:[2]
You can include email field into the export by setting email as public parameter in Slack administration settings: go to https://your_domain.slack.com/admin/settings#display_email_addresses ? Email Display ? select "Members and guests of <your_domain>, plus people from organizations you’re connected to" ? request new export archive. Now your backup (zip archive) will contain users.json file inside, which includes emails field.
P.S. maybe "Members and guests of <your_domain>" option will also achieve that, but I never tested it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Joel |
| Solution 2 | Kyo |
