margiebot icon indicating copy to clipboard operation
margiebot copied to clipboard

Access to user information.

Open rolfwessels opened this issue 9 years ago • 1 comments

Hi,

I have been storing the userId in a database. I now want to send them a private message at random intervals. I was wondering if it would be possible to get user details directly from the Bot?

I looked at the source and I see that there is a private property on the bot. (I now use this property with reflection to get the user's name .. this is obviously just a work around). Is there any better way to get users information when you have either their id or name? Maybe even get their email address?

Thanks

Rolf

rolfwessels avatar Nov 17 '15 06:11 rolfwessels

It looks like there is an api you can call for this: https://api.slack.com/methods/users.info

Workshop2 avatar Nov 17 '15 09:11 Workshop2