Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All guides
AI for Slack By James Joyner IV · · 7 min read Last reviewed Jul 2026

Slack Error: 'cant_invite_self' — Cause, Fix, and Troubleshooting Guide

Quick answer

Fix the Slack cant_invite_self error: you can't invite the calling user/bot via conversations.invite. Use conversations.join for public channels instead.

  • #slack
  • #api
  • #troubleshooting
  • #errors
Free toolkit

Stuck on this Slack error? Get the free incident triage checklist

A one-page PDF — the exact steps to isolate, fix, and verify a production error like this one. No spam, unsubscribe anytime.

Overview

cant_invite_self is returned by conversations.invite when the user being invited is the same identity making the call — most commonly a bot trying to add itself to a channel. Self-addition uses a different method.

{
    "ok": false,
    "error": "cant_invite_self"
}

Symptoms

  • A bot’s “join this channel” logic passes its own user id to conversations.invite and fails.
  • The same code works when inviting other users.
  • Happens right where the bot tries to bootstrap into a channel.

Common Root Causes

1. Bot invites its own user id

Code fetches auth.testuser_id and then passes it to conversations.invite, effectively inviting itself.

2. Wrong method for self-join

Using conversations.invite where conversations.join is required for adding the caller to a public channel.

3. Roster loop includes the bot

A bulk invite iterates a member list that accidentally contains the bot’s own id.

How to diagnose

Confirm the invited id equals the caller:

curl -s https://slack.com/api/auth.test \
  -H "Authorization: Bearer $SLACK_BOT_TOKEN"
{"ok": true, "user_id": "U0BOTBOT01"}
curl -s -X POST https://slack.com/api/conversations.invite \
  -H "Authorization: Bearer $SLACK_BOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"channel":"C0123456789","users":"U0BOTBOT01"}'
{"ok": false, "error": "cant_invite_self"}

Fixes

  • Use conversations.join to add the bot itself to a public channel (needs the channels:join scope):
curl -s -X POST https://slack.com/api/conversations.join \
  -H "Authorization: Bearer $SLACK_BOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"channel":"C0123456789"}'
  • For private channels, the bot can’t self-join — a human member (or admin) must invite it.
  • Exclude the bot’s own id from any roster you feed to conversations.invite.

What to watch out for

  • conversations.join only works for public channels and needs channels:join; private channels require a human to invite the bot.
  • Distinguish cant_invite_self (inviting the caller) from already_in_channel (target already a member) and not_in_channel (bot lacks membership to act).
  • After joining, verify with conversations.members before posting, so you don’t chase a not_in_channel next.
Free download · 368-page PDF

Fixed it? Get 500 Slack & DevOps AI prompts — free

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.

Did this fix your issue?

Free download · 368-page PDF

Get 500 Battle-Tested DevOps AI Prompts — Free

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.