Webex Teams Api



Enabling Integration via Webex Teams and Cisco DNA, SD-Wan, Intersight, Thousand Eyes via Cloud API Gateway. I was really excited to have a unique opportunity to put together a team of my fellow engineers to work on a Collaboration hacking contest within Cisco. Come build the future of business team collaboration on the Webex Platform. Through Webex APIs, SDKs, and widgets, your developers can integrate solutions with the Webex suite, or directly embed audio-video cloud calling and team collaboration right into your own native applications. Start developing with Webex APIs for messaging.

Webex Teams ApiLatest version

Released:

A Flask based Webex Teams chat bot.

Project description

This package makes creating Webex Teams bots in Python super simple.

This package is based on the previous ciscosparkbot project. This version will both move to new Webex Teams branding as well as add new functionality. If you've used ciscosparkbot you will find this package very similar and familiar.

If you don't already have a Webex Teams account, go ahead and register for one. They are free.

  1. You'll need to start by adding your bot to the Webex Teams website.

  2. Click Create a New App

  3. Click Create a Bot.

  4. Fill out all the details about your bot. You'll need to set a name, username, icon (either upload one or choose a sample), and provide a description.

  5. Click Add Bot.

  6. On the Congratulations screen, make sure to copy the Bot's Access Token, you will need this in a second.

Python 3.6+ is recommended. Python 2.7 should also work.

  1. Create a virtualenv and install the module

  1. The easiest way to use this module is to set a few environment variables

    Note: See ngrok for details on setting up an easy HTTP tunnel for development.

  2. A basic bot requires very little code to get going.

  3. A sample script that shows more advanced bot features and customization is also provided in the repo.

Advanced Options

Changing the Help Message

  1. Although 'set_greeting' has existed for a while now, you may mostly like the internal greeting mechanism, but only want to change the help banner itself. You can do that with the 'set_help_message' command like this:

Working with events other than created messages

  1. By default, the bot will configure the webhook to listen for messages:created events. This behavior can be changed using the 'webhook_resource' and 'webhook_event' parameters. So, for example, if you wish for the bot to monitor any changes to a room's membership list, you would instanciate the bot like this:

    You also need a way to catch anything other than 'messages', which is the only thing handled entirely inside the bot framework. Continuing the example of monitoring for membership changes in a room, you would also need to add a 'command' to catch the membership events. You would use the following to do so:

    The first argument, 'memberships', tells the bot to look for resources of the type 'memberships', the second argument '*' instructs the bot that this is not something that should be included in the internal 'help' command, and the third command is the function to execute to handle the membership creation.

  2. The bot can also be configured to listen for multiple different events. So, for example, if you wish for the bot to monitor not only new messages in a room, but also any card actions in a room, you would instanciate the bot like this:

    Once again, You also need a way to catch anything other than 'messages'. Continuing the example of monitoring card actions, you would also need to add a 'command' to catch the card actions. You would use the following to do so:

    The first argument, 'attachmentActions', tells the bot to look for resources of the type 'attachmentActions', the second argument '*' instructs the bot that this is not something that should be included in the internal 'help' command, and the third command is the function to execute to handle the card action.

Creating arbitrary HTTP Endpoints/URLs

  1. You can also add a new path to Flask by using the 'add_new_url' command. You can use this so that the bot can handle things other than Webex Teams Webhooks. For example, if you wanted to receive other webhooks to the '/webhooks' path, you would use this:The first argument, '/webhooks', represents the URL path to listen for, the second argument represents the Flask endpoint, and the third command is the function to execute to handle GET, PUT, or POST actions.

Limiting Who Can Interact with the Bot

  1. By default the bot will reply to any Webex Teams user who talks with it. But you may want to setup a Bot that only talks to 'approved users'.

  2. Start by creating a list of email addresses of your approved users.

  3. Now when creating the bot object, simply add the approved_users parameter.

  4. Now if a users NOT listed in the approved_users list attempts to communicate with the bot, the message will be ignored and a notification is logged.

ngrok will make easy for you to develop your code with a live bot.

You can find installation instructions here: https://ngrok.com/download

  1. After you've installed ngrok, in another window start the service

  2. You should see a screen that looks like this:

  3. Make sure and update your environment with this url:

  4. Now launch your bot!!

Local Development

If you have an idea for a feature you would like to see, we gladly accept pull requests. To get started developing, simply run the following..

Linting

We use flake 8 to lint our code. Please keep the repository clean by running:

Testing

Tests are located in the tests directory.

To run the tests in the tests folder, you can run the following commandfrom the project root.

This will generate a code coverage report in a directory called htmlcov

The initial packaging of the original ciscosparkbot project was done by Kevin Corbin.

This package was created withCookiecutter and theaudreyr/cookiecutter-pypackageproject template.

0.1.0 (2018-11-10)

  • First release on PyPI.

0.1.1 (2018-11-10)

  • Second release on PyPI.

0.1.2 (2018-11-11)

  • Added feature to easily change the bot greeting
  • Updated Example bot sample.py with better documentation and examples
  • Allow Response() objects to specify alternative roomId for reply

0.1.2.1 (2018-11-11)

  • Updated README with a very simple bot example with a link to the full sample.py script

0.1.3.0 (2019-10-03)

  • Adding new features for cards and membership management (Thanks @joshand!)

0.1.4.0 (2020-02-15)

  • Added feature to limit who can talk to the bot.

0.1.4.1 && 0.1.4.2 (2020-02-20)

  • Bug fix for when a Bots name is in a mention and causes command confusion

Release historyRelease notifications | RSS feed

0.1.4.2

0.1.4.1

0.1.4.0

0.1.3.0

0.1.2.1

0.1.2

0.1.2a0 pre-release

0.1.1

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for webexteamsbot, version 0.1.4.2
Filename, sizeFile typePython versionUpload dateHashes
Filename, size webexteamsbot-0.1.4.2-py2.py3-none-any.whl (13.0 kB) File type Wheel Python version py2.py3 Upload dateHashes
Filename, size webexteamsbot-0.1.4.2.tar.gz (23.7 kB) File type Source Python version None Upload dateHashes
Close

Hashes for webexteamsbot-0.1.4.2-py2.py3-none-any.whl

Hashes for webexteamsbot-0.1.4.2-py2.py3-none-any.whl
AlgorithmHash digest
SHA25600cea89864bd1743baf1cb14d5f02b8ccdbf42a6854f5dac927e31b081974e7d
MD5f0e19320370b139f6e991f4840181171
BLAKE2-256f9220ef4c4c03f662892080c73b3ec2f5210502a94c7efe23c5eecbf5124f0c2
Close

Hashes for webexteamsbot-0.1.4.2.tar.gz

Hashes for webexteamsbot-0.1.4.2.tar.gz
AlgorithmHash digest
SHA2569cd8f49612daeafbd55650aa54033ea52ff5832c874cac1b1257f1a51952083d
MD52630b623347af2ba067ad3cbee9803a1
BLAKE2-2563382f8d9c8d0fb75d44dd324198d8e1088efd45de4231b70ef079816f94b40cf

5 Ways to Connect Microsoft Teams and Cisco Webex in 2021

For many reasons and in many businesses, we regularly see organizations with instances of both Microsoft Teams and Cisco Webex.

This post addresses how businesses got to this situation and highlights the best ways to connect the two platforms together.

Why Microsoft Teams and Cisco Webex?

Common reasons for instances of both Microsoft Teams and Cisco Webex include:

  • Legacy or current Cisco hardware like telepresence, VoIP handsets, and Cisco Spark boards
  • Microsoft 365 packages offering free Skype for Business and Microsoft Teams licenses
  • Mergers and acquisitions where one company uses Cisco Webex and the other uses Microsoft Teams
  • A new CIO or IT Manager started and implemented their preferred solution
  • You interact with guests from other organizations that use different messaging platforms

Can Microsoft Teams replace Webex?

Microsoft Teams has tons of great features, like grid videos and custom backgrounds. You can integrate your conversations with Microsoft 365 and access direct routing.

But Microsoft Teams isn’t the right solution for everyone.

If you try to shift everyone to Microsoft Teams, you risk isolating some of your team members who use Webex.

People who don’t want to stop using their preferred app won’t switch easily. This puts your team at risk of shadow IT and other security issues.

It’s always better to give your team the freedom to use the tools they prefer.

If you do need to connect the two together, the next section outline five ways to connect the two platforms together.

1- Webex call features in Microsoft Teams

If all you want to do is connect your Microsoft Teams account holders with Cisco Webex calling features, here’s how:

In April 2020, Cisco announced a new Call Appfor Microsoft Teams. The app launches calls through Webex technology, even when you click the call button in Microsoft Teams.

To access this functionality, follow these steps:

  • Verify users have accounts activated in the Webex Control Hub
  • Ensure users are registered to the Cisco Webex Calling or Unified Communications Manager
  • Make sure users have the Webex app
  • Ensure you have Administratorprivileges for Microsoft Teams
  • Update phone numbers for users in the Azure Active Directory

With us so far? Great.

Head over to the Microsoft Teams Admin Center and click Teams Apps followed by Manage apps. You can search for the Webex Call function and toggle the app status to allowed.

Remember to update your permission policies to allow third-party apps too.

In the Teams apps menu, click on Setup policies and add the Cisco Webex Call app to your Microsoft setup. Users will now be able to click Webex Call at the bottom of a window when chatting in Microsoft Teams.

Or employees can click on the Webex Call function on the left-hand menu bar and just tap in the number of the person they want to call through Webex.

Pros:

  1. Simple way to connect Webex calling functionality with Microsoft Teams
  2. Embedded buttons in Teams make the function easy to use

Cons:

  1. Only works to connect two VoIP calling strategies. You can’t connect your chat messages or file sharing this way.
  2. Calling opens a new window, which means there are more tabs for users to keep track of.
  3. Only works to add Webex Calling to Microsoft Teams. You can’t add Microsoft calling to Webex instead.

2 – Cisco Webex and Microsoft 365 integration

Cisco recently announced integration between its Webex app and the Microsoft 365 suite.

How do I integrate Webex with Office 365?

Users can access files like apps like SharePoint and OneDrive from within the Webex app.

If your end goal is to use the Microsoft 365 suite within the Webex app, this integration will work just fine.

How do I integrate a Webex team with Outlook?

Go to your Cisco Webex admin Settings.

Click on Outlook then Outlook settings. You’ll have the option to Connect to Outlook. Choose Yes and hit the Save button.

Having more than one app integrated with Outlook sometimes causes problems with Webex. Before you integrate Webex and Outlook, you’ll have to unregister other tools. This includes removing Skype for Business connections.

Once your Outlook integration is ready, you can see the status of Webex contacts in Outlook.

Pros:

a. Users no longer have to leave their Webex app if they use Microsoft 365 for productivity tools like Microsoft PowerPoint and Microsoft Word.

b. You can benefit from Microsoft Teams governance and data privacy from Microsoft 365 whilst never leaving your Webex app.

c. Share content created in Microsoft apps in Cisco Webex spaces.

Cons:

a. This integration is available for multiple Microsoft apps, but not Microsoft Teams.

b. If you’re a Webex for Web user, you can only view these types of files, but not make any changes to them.

The Cisco Webex and Microsoft 365 integration is great for users that are happy to live in Webex – but it doesn’t take into account users that prefer Microsoft Teams for collaboration.

3 – Bot integration for Microsoft Teams and Cisco Webex

If This Then That (IFTTT) helps apps and devices work together.

There are examples of IFTTT working in homes and businesses alike.

When rules are set for one app or device to do something based on the behavior of another app of device, these are called recipes.

From common scenarios like turning up the heating in your home when the temperature drops below a certain threshold to syncing your Instagram and Dropbox account, recipes come in all shapes and sizes.

When setting recipes for both Microsoft and Cisco, this typically includes what happens on Microsoft Teams when a message is posted in Webex.

For this scenario, a Webex users sends a message and the bot in Microsoft Teams gets a notification.

Pros:

a. Bot integrations come with many pre-built recipes to choose from across a range of apps and devices.

b. Familiar look and feel to consumer IFTTT apps.

c. Options to add your own customized recipes.

Cons:

a. Administration time can be lengthy as scenarios have to be set up one-by-one.

Webex Teams Api Send Message

Webex Teams Api

b. When new users are added, administrators must build new recipes.

c. Functionality across platforms is limited.

d. Cross platform experience is not seamless. Notifications are received in a bot rather than native to a chat, space or direct message etc.

4 – Host Webex meetings in Microsoft Teams

For users that prefer Microsoft Teams for messaging and collaboration, but must use Cisco Webex for meetings, there is the Cisco Webex Meeting app.

This is perfect for running Cisco Webex meetings direct from Microsoft Teams.

The meeting app is also available for Slack, Workplace from Facebook, and Google Calendar.

Pros:

a. Schedule and join Cisco Webex meetings without leaving Microsoft Teams.

b. Microsoft Teams users just need to add the Webex Meetings app to their Microsoft Teams app.

c. Simple administration in the Cisco Webex Control Hub.

Cons:

a. The Cisco Webex Meetings app for Microsoft Teams doesn’t support accounts on webex.meetings.com, on meetingsln.webex.com, or on Cisco Webex Meetings Server sites.

b. Limited to Cisco Webex Meeting functionality.

c. Messages, chats, files etc cannot be exchanged via the Webex Meeting app for Microsoft Teams. A meeting must be launched to communicate across platform.

d. Jonathan Dame wrote on SearchUnifedCommunications that customers of both Cisco and Microsoft using the integration have labelled it clumsy, forcing them to consider back to working in silos.

5 – External federation for connecting with guests on different platforms

Webex Teams Api Login

Do you communicate with people outside your organization?

Do they use apps other than Microsoft Teams?

If the answer is yes to both of these questions, according to research, Cisco Webex is one of the most favored.

When this is the case, it becomes extremely unproductive moving out of Teams, into your external contact’s choice of app, and starting the conversation again.

Or even worse, end up resorting to email like it’s the 90s. (Okay, email has a purpose but you get the point).

That’s why Mio has created universal channels for Microsoft Teams with Webex…

You can stay in Teams and send messages to your contractors, suppliers, or clients who use Webex.

They stay in their platform too and Mio translates the messages across platform.

And it’s not just messages that are supported! GIFs, emojis, channels, DMs, and message edits/deletes are all supported.

Webex Teams Api Documentation

If this sounds like something you need, install Mio into either Microsoft Teams or Webex.

You choose which platform you use and your external contacts choose theirs.

If you’d like to learn more about enabling cross-platform messaging, you can watch our on-demand webinar with Mio CEO, Tom Hadfield, here.

Webex Teams Api Interview

You must be logged in to post a comment.