template-announcement-approvals
template-announcement-approvals copied to clipboard
Message can't be posted as bot
Hi,
I'm having trouble to send a message on a Channel. Heres my request:
curl -X POST \
https://slack.com/api/chat.postMessage \
-H 'Authorization: Bearer xoxp-********' \
-H 'Content-Type: application/json' \
-d '{
"channel": "mychannel",
"text": "this is my message",
"as_user": false
}'
And this is the response I get :
{
"ok": false,
"error": "missing_scope",
"needed": "chat:write:bot",
"provided": "identify,bot,incoming-webhook,channels:read,channels:write,chat:write",
"warning": "missing_charset",
"response_metadata": {
"warnings": [
"missing_charset"
]
}
}
As you can see, it asks for chat:write:bot
scope, while I have the chat:write
In the documentation it is stated :
For new Slack apps, chat:write replaces both chat:write:user and chat:write:bot. Here's a bit more detail on why perspectival scopes are disappearing.
And there is no way to add the scope chat:write:bot
(scope not found in the list)
Does anyone can help ?
same response when I try my xoxb-*
token
{
"ok": false,
"error": "missing_scope",
"needed": "chat:write:bot",
"provided": "calls:read,calls:write,channels:manage,channels:read,chat:write,dnd:read,emails:write,files:read,groups:read,im:history,im:read,im:write,incoming-webhook,mpim:history,mpim:read,mpim:write,pins:write,reactions:read,reactions:write,remote_files:read,remote_files:share,remote_files:write,team:read,users:read,users:read.email,users:write",
"warning": "missing_charset",
"response_metadata": {
"warnings": [
"missing_charset"
]
}
}
I'm not 100% sure this is the right place, but I am also experiencing this issue.
Has anyone found a solution? The oAuth scopes don't let me add "chat:write:bot". I suspect they've broken something.
Slack Support team have responded quickly!
You can no longer set as_user
to false
. They've raised a bug report to fix the error that's returned.
Facing the same issue, couldn't find chat:write:bot in scopes
encountering the same issue for a slack-based bot.
@johntotten please check this answer https://stackoverflow.com/a/63446845/1294870 and please give up vote if it resolved
I tried this template today and it's working. You can probably close the issue now @TheSquad
you need to make sure that your slackbot has proper permissions set. Check and see if your bot has the ability to "chat:write:bot".
you need to make sure that your slackbot has proper permissions set. Check and see if your bot has the ability to "chat:write:bot".
I think that's the problem. that there is no way to set that particular scope.
For anyone who might encounter this problem in the future - make sure that you're using the bot token, not the user one.
I was facing the same issue: Response: {'ok': False, 'error': 'missing_scope', 'needed': 'chat:write:bot', 'provided': 'incoming-webhook,calls:write'}
After some digging on community forums, It seems like "chat:write:bot" is not accessible from the Bot User scopes in the Slack console. Adding the scope "chat:write.customize" solved the problem for me.
I am having similar issue where I can post a message, but can't update the message I just sent. Even with chat:write
and chat:write.customize
permissions.
I have open a support ticket.
Answer: I am using a library that use conversation.list if channel provided is a channel name. I was missing channel:read
scope.
Has anyone fixed this issue? I've tried several things that I've read here but nothing works. In my case:
[DEBUG] web-api:WebClient:1 http request result: {"ok":false,"error":"missing_scope","needed":"connections:write","provided":"app_configurations:write","response_metadata":{"scopes":["app_configurations:write"]}}