Slack error restricted_action: A workspace preference blocks this posting
Last verified against Slack API reference - chat.postMessage errors
A workspace preference prevents the authenticated user from posting.What error restricted_action means
The workspace's own settings — not your token, not your scopes — forbid this action. Slack's description: "A workspace preference prevents the authenticated user from posting." Admins can restrict who may post in specific channels (announcement-style channels are the canonical case), and when your app or user falls outside that allowlist, the API refuses with restricted_action.
This family has documented, more specific siblings on chat.postMessage for particular channel configurations: restricted_action_read_only_channel ("Cannot post any message into a read-only channel"), restricted_action_thread_only_channel ("Cannot post top-level messages into a thread-only channel"), and restricted_action_thread_locked ("Cannot post replies to a thread that has been locked by admins"). Whichever variant you receive, the meaning is the same: posting rights in this channel are managed by workspace policy, and code cannot override policy.
Treat it as a routing problem. Either the bot needs to be granted posting rights in that channel by an admin, or the message belongs in a channel the bot may actually post to. Retrying is pointless; the answer will not change until a human changes the channel's settings.
What it looks like
{"ok": false, "error": "restricted_action"}Why it happens
- The channel restricts posting to specific members or roles (announcement channel) and the bot is not on the list.
- The channel is configured read-only, or allows only thread replies, or the target thread has been locked by admins.
- An org-level policy restricts app posting in the target channel.
How to fix Slack error restricted_action
- 1Ask a workspace admin to check the channel's posting permissions and add the app (or its user) to the allowed posters.
- 2If the channel is intentionally read-only, route the message to an appropriate channel instead and keep the read-only one out of your app's destinations.
- 3For thread-related variants, adjust behavior: post top-level in thread-only channels' threads, and stop replying into locked threads.
- 4Log the channel ID with the error so support can tell which policy applied.
How to stop it recurring
During onboarding, validate each configured destination channel with a low-stakes test post and surface policy failures to the installing admin immediately, rather than discovering them when a critical alert fails to deliver. Keep an explicit allowlist of destination channels under the app's control and re-validate when admins change channel settings.
Official reference: Slack API reference - chat.postMessage errors. See all Slack error codes or the Slack limits and quotas.
Related codes
- ekm_access_denied: Admins have disabled messaging here (EKM)Administrators have suspended the ability to post a message.
- no_permission: Token lacks permission in this contextThe workspace token used in this request does not have the permissions…
- is_archived: Channel has been archivedChannel has been archived.
- not_in_channel: Bot is not a member of the channelCannot post user messages to a channel they are not in.
Error restricted_action - quick answers
What does Slack error restricted_action mean?
The workspace's own settings — not your token, not your scopes — forbid this action. Slack's description: "A workspace preference prevents the authenticated user from posting." Admins can restrict who may post in specific channels (announcement-style channels are the canonical case), and when your app or user falls outside that allowlist, the API refuses with restricted_action .
How do I fix Slack error restricted_action?
1. Ask a workspace admin to check the channel's posting permissions and add the app (or its user) to the allowed posters. 2. If the channel is intentionally read-only, route the message to an appropriate channel instead and keep the read-only one out of your app's destinations. 3. For thread-related variants, adjust behavior: post top-level in thread-only channels' threads, and stop replying into locked threads. 4. Log the channel ID with the error so support can tell which…
Stop debugging Slack by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.