Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

392
Vistas
Channel_not_found: authed_user cannot post a message to a channel via Slack API

I'm trying to post a message on a channel a user belongs via the Slack Api as an authed_user.

here is the flow:

  1. User gives permissions with scopes 'chat:write,channels:write,channels:history'
  2. I receive a token along with some more information from Slack that looks like xoxp-122474-a bunch of numbers
  3. I create a Slack Client with the token and sends a request with:
 const { WebClient } = require('@slack/web-api');

 const client = new WebClient(token.access_token);

 await client.chat.postMessage({
      channel: channelId, // = Something similar to C02E2K5CCUZ
      as_user: true,
      text: "here is some text",
    });

I get an error from the slack API, 'channel_not_found' but I checked the channel does exists + the user is in the channel.

What should I do to make this work? Am I missing anything?

Thank you !

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It's possible that error is a red herring. The as_user parameter might be messing you up. That parameter can only be used for legacy apps. You can still use chat.postMessage but make sure you are also requesting the [chat:write.customize][1] scope. You will then be able to customize the posting user by defining the username and icon_urlparameters in your API call.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda