# Erro 422 ao enviar mensagem para canal privado do Slack

**URL:** https://meta.discourse.org/t/422-error-when-sending-message-to-private-slack-channel/119037
**Category:** Support
**Tags:** chat-integration
**Created:** [29 Maio , 2019 21:46 UTC](https://meta.discourse.org/t/422-error-when-sending-message-to-private-slack-channel/119037 "2019-05-29T21:46:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![yanokwa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yanokwa/32/105083_2.png) [@yanokwa](https://meta.discourse.org/u/yanokwa)
#### Post date: [29 Maio , 2019 21:46 UTC](https://meta.discourse.org/t/422-error-when-sending-message-to-private-slack-channel/119037/1 "2019-05-29T21:46:30Z")

</div>

When I try to send a test message to a private (but previously public) channel, I get a 422 error. When I check the logs, I see this:

```json
Test provider failed {:error_key=>"chat_integration.provider.slack.errors.channel_not_found", :request=>"", :response_code=>"200", :response_body=>"{\"ok\":false,\"error\":\"channel_not_found\"}"}

```

This setup worked when the channel was private. I tried re-installing the Slack app and deleting the rules and recreating them. When I use @username rule or a public channel that seems to work well.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [12 Junho , 2019 09:50 UTC](https://meta.discourse.org/t/422-error-when-sending-message-to-private-slack-channel/119037/2 "2019-06-12T09:50:30Z")

</div>

Double check you have configured all the “scopes” listed in the plugin topic: [Set up Slack notifications using the discourse-chat-integration plugin](https://meta.discourse.org/t/set-up-slack-notifications-using-the-discourse-chat-integration-plugin/66730)

Do slash commands work from the private channel? If so, try creating a rule using those, and see whether it appears in the Discourse admin interface.

---

<div class="post-metadata">

### Author: ![yanokwa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yanokwa/32/105083_2.png) [@yanokwa](https://meta.discourse.org/u/yanokwa)
#### Post date: [12 Junho , 2019 12:35 UTC](https://meta.discourse.org/t/422-error-when-sending-message-to-private-slack-channel/119037/3 "2019-06-12T12:35:30Z")

</div>

All scopes are configured as required by the docs.

 ![scopes](https://global.discourse-cdn.com/meta/original/3X/d/5/d50dbc773d97daf3afb7f458f21dac507702215d.png)

`/discourse watch private-category` works from the private channel. I can see the rule get created in Discourse.

When I try to send a test message from Discourse with an ID of a topic in the private category, I get the 422.

chat integration discourse username is `system`

---

<div class="post-metadata">

### Author: ![antulik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/antulik/32/118279_2.png) [@antulik](https://meta.discourse.org/u/antulik)
#### Post date: [30 Agosto , 2019 09:33 UTC](https://meta.discourse.org/t/422-error-when-sending-message-to-private-slack-channel/119037/4 "2019-08-30T09:33:38Z")

</div>

Temos o mesmo problema.

Curiosamente, as notificações para o Slack funcionam para o canal do Slack recém-criado, mas não para o antigo.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [23 Março , 2023 15:37 UTC](https://meta.discourse.org/t/422-error-when-sending-message-to-private-slack-channel/119037/5 "2023-03-23T15:37:43Z")

</div>



---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [29 Abril , 2023 12:53 UTC](https://meta.discourse.org/t/422-error-when-sending-message-to-private-slack-channel/119037/6 "2023-04-29T12:53:14Z")

</div>


