Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

166
Visualizações
Getting user display name from Slack app API Bolt with user select menu

I have been following the documentation to select a user from my workspace using the Slack app API kit.

However, once I select a user this is the payload that is show in the action listener

{
  type: 'users_select',
  action_id: 'user_select',
  block_id: 'section678',
  selected_user: 'U02GL7WT4JX',
  action_ts: '1633620609.616449'
}

Technically, I do have the user via the ID, but I was hoping that I would be able to get the slack display name rather than the id. I've been looking at the slack documentation but I see no other way to get the username other than using the Slack REST API.

I would rather get the slack display name from using the App kit rather than the slack rest api. Is this possible?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I overestimated the difficulty of this task. Turns out bolt allows for easy access to the web api as stated here

Here's my resulting code

index.js

  const result = await client.users.info({
     user: payload.selected_user,
  });
  this.selectedUser = result.user.name;
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda