Not authorized to send message from a chatbot

Description
Is it mandatory to install a chatbot in order to send message?

Error
My chatbot is not installed (and i don’t want to because the it’s only goal is to send messages to a channel) and when I post to im/chat/messages a message I receive the following error: {code: 7004, message: ‘Not authorized.’}

Which App Type (OAuth / Chatbot / JWT / Webhook)?
Chatbot (authenticate with oauth/token?grant_type=client_credentials

How To Reproduce (If applicable)
Steps to reproduce the behavior:

  1. Create a chatbot
  2. Add scope imchat:write:admin
  3. Don’t install the bot
  4. Authenticate with oauth/token?grant_type=client_credentials
  5. Get access token and call im/chat/messages

More
If we must install the bot:

  • can it be silent (no welcome message to hundreds of users)?
  • can it be not visible?
  • can I do the same with another technique (I simply want to send a message to some users when our app monitoring detect an error)

Thanks.

Hi @plm,

Installing a Chatbot is not a prerequisite for this endpoint.

However, can you make sure that you have the following view and edit permissions enabled in your Chat settings?

Thanks,
Will

Hello,

Sorry for the delay.

I’m not the administrator of the account so I think that I can’t see this screen.
Can you tell me what are the permissions I need to ask to my admin?

Thanks,

Yann.

Hi @plm,

The permissions yo ask your admin about are the ones identified in the screenshot Will shared :slightly_smiling_face:

Gianni

Okay, I may not have made myself clear: what are the checkboxes my administrator must check for me in your screenshot? Thanks.

Hi @plm,

Please ensure you have checked off the view/edit fields for the following:

  • Chatbots
  • Chat Channels
  • Chat Messages

Thanks!
Will

Thanks. I will let you know informed if the problem is solved or not.

Thanks, @plm —keep us posted!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.