Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

387
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!