userName from interaction (from interactive button click)


i am developing a /remind slash command:

One of the requets, is when someone clicks a remind ‘completed’ on a channel reminder, the channel text output is 'Completed by ’

Currently, buttons sending ‘interactions’ to a update url send userId and context as a payload.

User Id is always something like : 789fyrgo33nhtnimy8hdum1maw , where username is like scottd.

In order to accomplish this, I need to maintain a mapping of users that have interacted with the slash command and store their userId. The lookup on myside at the time of response for the interaction and include the username. This could be done with an addtional api call to lookup the user by id but…

It would be much more efficient and less complex if we could include the username in the interaction’s reponse too? or… what is the recommended way to extract username from userid without an addtional api call?

thank you!

Kind Regards,

Hi @scottleedavis! Apologies for late reply - I’ve escalated this for our devs to look at and I’ll let you know once I get a response.

One response from a dev: “I’m not aware of any way to do it other than to use the API.”

Alright, then you @amy.blais! :slight_smile: