Last active
July 20, 2021 11:21
-
-
Save colmdoyle/65b3eb5b906d9a9602aab256f320e949 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const response = await client.users.profile.get({user: 'USER_ID_GOES_HERE'}); | |
console.log(response); | |
console.log(response.profile.pronouns); | |
console.log(response.profile.fields); // These are where custom fields like Department or Location would be |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ok":true, | |
"profile":{ | |
"title":"", | |
"phone":"", | |
"skype":"", | |
"real_name":"Colm Doyle", | |
"real_name_normalized":"Colm Doyle", | |
"display_name":"colmdoyle", | |
"display_name_normalized":"colmdoyle", | |
"fields":{ | |
"XfJFMSKEUW":{ | |
"value":"https://cdoyle.me", | |
"alt":"" | |
}, | |
"XfRB5VATC7":{ | |
"value":"Developer Relations", | |
"alt":"" | |
} | |
}, | |
"status_text":"", | |
"status_emoji":"", | |
"status_expiration":0, | |
"avatar_hash":"28e4bc399c9a", | |
"image_original":"https://avatars.slack-edge.com/2019-09-24/771293549024_28e4bc399c9a68f9a21c_original.png", | |
"is_custom_image":true, | |
"email":"cdoyle@acme-corp.com", | |
"pronouns":"he/him", | |
"first_name":"Colm", | |
"last_name":"Doyle", | |
"image_24":"https://avatars.slack-edge.com/2019-09-24/771293549024_28e4bc399c9a68f9a21c_24.png", | |
"image_32":"https://avatars.slack-edge.com/2019-09-24/771293549024_28e4bc399c9a68f9a21c_32.png", | |
"image_48":"https://avatars.slack-edge.com/2019-09-24/771293549024_28e4bc399c9a68f9a21c_48.png", | |
"image_72":"https://avatars.slack-edge.com/2019-09-24/771293549024_28e4bc399c9a68f9a21c_72.png", | |
"image_192":"https://avatars.slack-edge.com/2019-09-24/771293549024_28e4bc399c9a68f9a21c_192.png", | |
"image_512":"https://avatars.slack-edge.com/2019-09-24/771293549024_28e4bc399c9a68f9a21c_512.png", | |
"image_1024":"https://avatars.slack-edge.com/2019-09-24/771293549024_28e4bc399c9a68f9a21c_1024.png", | |
"status_text_canonical":"" | |
}, | |
"response_metadata":{ | |
"scopes":[ | |
"users.profile:read", | |
"commands" | |
], | |
"acceptedScopes":[ | |
"users.profile:read" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment