https://discord.gg/botpress logo
is it possible to set up a blacklist or something ...
# 💻developers
h
Hello everyone, can you tell me, is it possible to set up a blacklist or something similar for the bot so that it is not shown to all users? For example, close access from the office IP so that employees do not torment the bot or from a spamming client?
w
are you speaking about webchat on your website?
h
yes
w
the logic must be on your website, it knows: - if the user is logged or not, - if the logged users can see or not webchat - visitor (user) IP and it does not embed webchat code
h
Thank you, then we will look at it from the site side I just thought that since the bot sees individual users and tracks them, it would be possible to carry out some filtering from the bot side
w
In this case, you're stressing the bot to check the ACL and apply it
You can develop this in the bot: - Call an API (on your server) to check if the user is logged in or banned. - Pass the user's IP from the website to the bot (using JavaScript on your site). - Use an execute code card to display a message (or nothing) and stop the flow if the user is not authorized. This will happen every time the bot receives a message.
h
Thanks for the detailed answer
w
You could request the feature, but then you would need to give access to the chatbot dashboard to configure them. It’s simpler if this is handled on the backend of your site.