bmfteixeira
bmfteixeira

Reputation: 134

Slack API - Hide some information of profile in response

When using users.list method I'm getting every profile information of every team member. But I need to hide some of this information (because a user can inspect the page, listening to the requests and getting knowledge of the Skype ID or phone number for example). Is there any special argument I can send to Slack API to only return the profile.images & profile.real_name?

Current request:

$.ajax({
        type: 'GET',
        dataType: 'json',
        url: 'https://slack.com/api/users.list?token=' + slackAccessToken + '&presence=1&pretty=1',
        data: {format: 'json'}
       };

Upvotes: 0

Views: 252

Answers (1)

bmfteixeira
bmfteixeira

Reputation: 134

After hours trying to get this done, the best way of doing this is building a proxy (simple PHP file) as endpoint of your request and filter the informations there. Otherwise this can create a security leak.

Upvotes: 0

Related Questions