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

200
Visualizações
Verification of Slash Commands using Bolt-JS

I'm currently writing a Slack bot using BoltJS and wanted to add verification using the integrated verify() method, which needs the signing secret as well as the incoming request. The problem is, that commands triggering the app.command() method do not provide the whole request. It only provides the payload and thereby the verify() method throws following error:

TypeError: stream.on is not a function

since none of the provided parameters are valid.

//These are the parameters of the app.command method

export interface SlackCommandMiddlewareArgs {
    payload: SlashCommand;
    command: this['payload'];
    body: this['payload'];
    say: SayFn;
    respond: RespondFn;
    ack: AckFn<string | RespondArguments>;
}

//This is what the SlashCommand Object is made of for context

export interface SlashCommand extends StringIndexed {
    token: string;
    command: string;
    text: string;
    response_url: string;
    trigger_id: string;
    user_id: string;
    user_name: string;
    team_id: string;
    team_domain: string;
    channel_id: string;
    channel_name: string;
    api_app_id: string;
    enterprise_id?: string;
    enterprise_name?: string;
    is_enterprise_install?: string;
}

Is there any way to catch the request before the command handler receives it with which I could verify it, or am I missing something else completely? I haven't found anything regarding this in the documentation but I'll keep looking in the meantime.

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

0

The documentation from slack, states that :

Some SDKs perform signature verification automatically, accessible via an easy drop-in replacement of your signing secret for your old verification token. See the SDK support section for more detail. https://api.slack.com/authentication/verifying-requests-from-slack#about

And Bolt for JS is one of the supported SDK

https://api.slack.com/authentication/verifying-requests-from-slack#verifying-requests-from-slack-using-signing-secrets__sdk-support

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