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
Authenticating the user that triggered the bot command in Google Chat bot

I'm making a Google Chat bot with NestJS. It accepts slash commands and allows for interaction with an already existing system. The messages returned on the POST endpoint sometimes include private info or JWTs, so I need to improve security.

I need a way to authenticate and reliably identify the user that triggered the bot command. Currently I'm using the user email provided in the POST body and validating the Bearer token from the header.

Is there a good way to authenticate the user and make sure someone didn't just change the email in the request body?

A solution that could work:

Instead of returning the reply message contents in the POST response, send the message directly to the user it was requested for.

So even if someone changes the email in the request body to someone elses, they do not get the reply, only the requested email gets it.

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

0

You can verify the authenticity of the app by checking the bearer token send it to the server

POST
Host: yourappurl.com
Authorization: Bearer AbCdEf123456
Content-Type: application/json
User-Agent: Google-Dynamite

Google Chat includes a bearer token in the Authorization header of every HTTPS Request to an app.

You can verify your bearer token using an open source Google API client library, in your case Node.js

You can review the full guide here

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