Comments (13)
If you used the bot token to send a message from elsewhere and you're using the same bot token to receive notifications, then yes, my understanding is that you'd be able to retrieve that message using the bot token.
from webex_bot.
Hi, I haven't used this particular library yet, but it looks like you can just create a Response
object and pass in the relevant attributes, such as "text"?:
response = Response()
response.text = "Your message here"
from webex_bot.
Yes or even simplier just reply with a string.
from webex_bot.
The Webex bots do not allow this by design. From https://developer.webex.com/docs/api/guides/bots :
A bot can only access messages sent to it directly. In group spaces, bots must be @mentioned to access the message. In 1-to-1 spaces, a bot has access to all messages from the user.
Integrations (https://developer.webex.com/docs/integrations) can be used to process messages that do not require @mentions, but is because integrations act on behalf of a user.
from webex_bot.
Thank you. Is there any python library that can support this "integrations"? I would like to make a Bot/Intergation that would check in the messages of the room for specific words in order to take actions
from webex_bot.
It's the same API, just a different, more complex authentication mechanism. Theoretically, you could create the auth tokens outside of this library for use with this library, though not directly supported (I suspect)
from webex_bot.
Specific to your question, I don't personally know of a library that works directly with the auth flow to make an integration.
There are examples about the oauth flow:
- https://github.com/WebexSamples/webex-flask-oauth-example
- https://github.com/WebexSamples/webex-oauth-integration
- https://developer.webex.com/blog/real-world-walkthrough-of-building-an-oauth-webex-integration
from webex_bot.
Let me give you another scenario. Let me know please if it works. Lets say that a service is sending via a bot (called XXX) a message to a webex channel. If I run your script with the token of the same XXX bot, is it going to read and react on messages sent by the same XXX bot but via the service from above? I mean the same bot and tokens are used by two in the same time.
from webex_bot.
I'm not exactly sure if I understand your question, but when messages come in, they have metadata such as the user/entity e-mail address that sent the message. With that metadata, you can filter the messages to prevent bots from talking to other bots or allow only certain users to interact with the bot.
from webex_bot.
I have run your script with the bot token which is set by another service. Once the bot is sending a message via the service, your script is showing me an event with the following text: "Websocket ack message with ID=xxx. Completed'". Question: How can i tune your demo script in order to run action based on the content of the message which was sent by the service (using the same bot token)? Can your libabry read the message which was sent by a other service? It the same bot for service and your demo script. Thank you
from webex_bot.
Btw, how can I turn on the Debug mode? How i see only INFO messages. Thanks
from webex_bot.
Thank so much, that answers to my question. What would be the simplest code that would respond to echo comand with a text? I see your demo include more complex case by returning adaptive cards...
from webex_bot.
I was able to make what I want. In term of making your script to react on a message which a Bot has created via another service.
Another question here: how can I make Bot to reply to a message? In your case Bot is creating a new message, however I want Bot to reply to a message where he was mentioned into. Thanks
from webex_bot.
Related Issues (20)
- server rejected WebSocket connection: HTTP 404 (code = 1006, reason = [no reason]) HOT 2
- Bot not receiving messages HOT 2
- Python 3.10+ Support. HOT 3
- send an attachment .txt or xlsx file ?
- `AttributeError: 'WebexBot' object has no attribute 'command'`
- TypeError: 'staticmethod' object is not callable, when run the 'help' command - Bug HOT 1
- Future exception was never retrieved HOT 2
- default help card is annoying HOT 3
- webexteamssdk.exceptions.ApiError: [400] Bad Request - Unable to retrieve content HOT 2
- The card displayed for Help restricts the number of buttons to 5 HOT 3
- Example if Response with file attachement HOT 3
- How to add more command_keyword
- Websockets.exceptions.ConnectionClosedError HOT 3
- Running webex_bot on Ubuntu 20.04 gets TypeError on action response
- Websocket connection through Proxy Server HOT 3
- Help get user info within command function.. HOT 1
- Bot not responding to messages with attachments (no log output either).
- warning 'open to everyone' still there when defining approved_domains HOT 1
- removeprefix() is 3.9 only HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webex_bot.