Webex Api Developer



Embedded APIs Let You Extend and Leverage Webex Devices

Testing: on a developer laptop machine or on a CI environment to run a battery of test with no connection to the Webex APIs, and without 409 (Rate Limitations) QA: run your code against a stable version of Webex Teams (as the Cloud Service is incrementally upgraded, some bugs can be hard to replay. New Announcement. Sign up free Log in. To use the Admin APIs or the interactive Webex for Developers documentation as an admin, you will need to sign into the Webex for Developers web site with the new administrator account using your alternate email address. You'll need to generate authentication tokens as this administrator account, rather than from your normal account. Whether you’re new to Webex Devices or new to programming, the Introduction to xAPI for Cisco Collaboration Devices learning lab is for you. Indeed, the lab will take you all the way from connecting to the admin interface of your device, and invoking your device’s API from HTTP clients or Node.js scripts.

Webex Devices help teams communicate and create together in real time. The Collaboration devices can be placed in meeting rooms or at desks as described on Project Workplace. Yet, high quality audio and video for successful meetings are not the unique characteristics of these devices: they are also fully programmable! Through embedded APIs (often referenced as xAPI), you can extend and leverage your Webex Room and Desk Device capabilities in several ways:

  • Create User Interface components to customize the meetings experience, and control IoT devices such as lights, curtains, projectors from the device controls interface.
  • Configure devices at scale via automation scripts
  • Initiate, or respond to calls automatically
  • Deploy code onto the devices themselves, removing the need to deploy external control system

Virtual Simulator: experience a custom In-Room Controls user interface
deployed to a Webex Room Device to control lights and blinds.

In this blog, I’d like to introduce you to the technical resources we recently assembled at DevNet to help developers build applications for Webex Room and Desk Devices.

CE and xAPI Learnings Labs

Whether you’re new to Webex Devices or new to programming, the Introduction to xAPI for Cisco Collaboration Devices learning lab is for you. Indeed, the lab will take you all the way from connecting to the admin interface of your device, and invoking your device’s API from HTTP clients or Node.js scripts.

Pick a DevNet learning lab and start coding for Webex Devices in minutes

Once you’ve discovered the basics of your Webex Device’s API, you’ll certainly be interested in continuing your journey by taking these more advanced labs:

And if you’re interested in retrieving “People count” metrics from your Room Device’s face detection capability, stay tuned to the DevNet Twitter account for the “Room Analytics” learning lab announcement in the coming weeks.

Webex Room Kit Sandboxes

Wait! You don’t have a Webex Device at hand? Or you don’t have admin or integrator credentials to your device? Or you own a device but don’t feel confident to grow your developer skills on it?

No worries, we’ve got your covered. Starting today, we are happy to announce new reservable sandboxes. These sandboxes are built up from Web Room Kit Devices, and come with multiple versions of the Cisco CE (Collaboration Endpoint) software.

Reserve a Room Kit device for up to a week via the DevNet Sandboxes

In the Collaboration Catalog, scroll to the “Room Kit” sandboxes and click the ‘RESERVE’ button to get instant access to your Webex Device for up to 1 week.

Every DevNet Sandbox comes with detailed instructions to help you code in a snatch

xAPI Developer Community

The good news is that you’re not alone: hundreds of developers have already gathered in a Webex Teams space to share code samples and support one another. Click to join the “xAPI devs” space. Note that this community has assembled numerous code samples to help you getting started with Webex Devices programming, as well as Postman collections for xAPI.

And don’t forget to visit the Dev Center for Room Devices, as well as the awesome-xapi catalog on Github where community samples, tools, documentation and tutorials are gathered.

Learn How You Can Program for Webex Devices in the DevNet Zone at Cisco Live

There’s a lot for you to see/learn/do in the DevNet Zone at Cisco Live in Orlando. Check out these sessions, workshops, and learning labs:

New Classroom Session
Integrated, Automated Meetings Rooms with xAPIs and Macros (DEVNET-2071)
Tuesday: 10:30 – 11:15 am
Join this demo-rich session to discover Cisco CE 9.2.1+ extensibility & programmability
uses cases, from live analytics to branding and custom In-Room Controls.

New DevNet Workshop
Enhancing Meeting Rooms User Experience with xAPIs (DEVNET-2074)
Monday: 3:30 – 4:15 pm & Wednesday: 10:30 – 11:15 am
Get hands-on with xAPI in this instructor-led session where you will implement an
end-to-end In-Room Control Panel & deploy it to a Room Kit’s Touch10 interface.

New DevNet Sandbox: Room Kit
Stop by the DevNet Sandbox (D7) to learn about the ‘Reservation’ sandboxes for CE 9.2.1 and 9.3! (Tip: Ask our Sandbox team why they placed Avengers, Marvels, & other comics in front of the reservable Room Kit Devices.)

New Learning Labs and Live Demo
Take one of our self-paced labs: “Introduction to xAPI, Personalizing Webex Devices.” Or discover the specifics of the Live React Map (see illustration below) that links to the Room Kits placed at the workshops. You’ll learn how to build interactive maps from the face recognition built-in capability of Webex Rooms Devices.

Live React map displaying real-time people count metrics, captured by RoomKit devices

Webex Devices in the DevNet Zone!
This year, we’ve installed 12 Room Kits that are monitoring live activity in the DevNet Zone. We’ve also installed a dozen Touch10 interfaces so that you can experiment with xAPI, the API exposed by Cisco TelePresence software. Don’t miss this unique opportunity to experience and learn how you can customize, extend, and program for Webex Devices.

I hope to meet you soon in the DevNet Zone in Orlando, or chat in the “xAPI devs” Webex Teams space. You can also keep up with the latest from Cisco Live US by visiting developer.cisco.com/ciscolive

Happy coding!
Stève

Webex graph

using API Documentation

Webex provides a set of APIs that can control virtually every aspect of the experience, including Bots and Integrations, that can increase your use cases even further. In this lab, you will set up a Bot, which will create a Space and then invite users to this Space. From the Provisioning Portal, you will then be able to use the Bot to send messages to the Space, in order to notify a group of users of changes made via the portal.

The REST APIs you have used so far all use the basic authentication method with a username and password. In Webex, you will use an access token, which is still just a long string of characters that is applied to the header of the request and used for authentication.

While it is possible to perform all functions as yourself using a personal access token, the goal in this lab is to create a Webex Space for notifications, to let all administrators know of changes that were performed. For this type of application, it makes sense to have a Space and create a Bot, whose purpose is to send these notifications. This allows the Bot account and its access level, to be limited to this purpose, as opposed to having, in effect, your personal credentials stored in an application. You will create the Bot, get it's access token in order to send messages on its behalf, then create a Webex Space and add the Bot to it.

Webex Api Developer

While you could send requests via Postman or SoapUI, for this exercise, we'll use the built-in documentation, which allows you to send requests using the personal access token. The Webex API is documented here: https://developer.webex.com/docs/platform-introduction

In this section, you will perform the following tasks:

  1. Create a Bot
  2. Create a Webex Space using Bot
  3. Add a User to the Space
  4. Send a Message to the Space using Bot
  5. Verify Message was Sent

You will start by creating a notifications Bot.

Webex Api Developer

Step 1 - Create a Bot

  1. Access the Webex API documentation home page at: https://developer.webex.com/docs/platform-introduction
  2. Click Log in at top right.
  3. If necessary, enter the following credentials and sign in:
    • Email address: pod5@ltrcol2574.33mail.com
    • Password: c1sco123
  4. Once logged in, select Bots in the left column, in the OVERVIEW section.
  5. Click Create a Bot.
  6. For the Bot Name, enter Pod5 Test Bot
  7. For the Bot Username, enter cl2021-pod5-bot, which will create a username of cl2021-pod5-bot@webex.bot
  8. Click on one of the Icon images for your Bot, so that it is selected.
  9. In the Description paste the following text: [HOLCOL-2574 Notification Bot API for Pod 5](https://collabapilab.ciscolive.com)
  10. At the bottom, click Add Bot.
  11. You should now see a Congratulations message and some details about the Bot. Besides the information you specified, you see the Bot's Access Token. This is the token you will need to send messages on behalf of the Bot. The Bot ID is not important for our purposes.
    Be sure to keep track of this access token!! If it is lost, the only course of action is to generate a new one, which invalidates the previous token.
    Click Copy next to the Bot Access Token (you might want to paste it into a Notepad window, since this will be used multiple times in the lab, especially in later sections).

Step 2 - Create a Webex Space using Bot

Once you've stored your Bot's access token, you can perform functions like creating a Space with it.

  1. Access the Webex API documentation home page at: https://developer.webex.com/docs/platform-introduction
  2. To create a Space, or Room, in the left column in REST API section, expand API Reference. Under Rooms click
    (or click https://developer.webex.com/docs/api/v1/rooms/create-a-room ) You'll notice the page is laid out such that the left column includes the API methods, in their various categories, the middle includes details about the currently selected API method (in this case Create a Room).
    In the Webex API, Spaces are always called Rooms, due to product rebranding in the past. We will use the terms Spaces and Rooms interchangeably in this guide, but any API request/response to or from Webex will always use the Rooms term.
  3. The right column includes a request builder, where you can execute requests with any supported parameters.
    Uncheck the Use personal access token setting.
  4. In the Bearer box, paste your Bot's access token obtained previously, so that you can create this room on behalf of the Bot, and not your own personal account that you are logged in as.
    If you don't have the Bot's access token, you can click on your user button in the top right then My Webex Apps. From there you can click Regenerate Access Token. This will invalidate the old token and create a new one.
  5. Below the Bearer setting, in the Body section, enter the following room title: HOLCOL-2574 Notifications
    Please make sure this Room title is entered correctly. Later on you will search for this exact Space name.

  6. Click Run at bottom right of that page to execute the request.
  7. The response is presented below the Run button. You see the 200 OK and the Room (Space) information. Make note of your Room 'id' setting as illustrated below in the example (copy this value to Notepad++ or a text editor, since it will be used in subsequent steps). This is the unique identification of the Room, and will be used in subsequent operations.

Step 3 - Add a User to the Space

Now that you have a Space created by your Bot, add a user to it so that you can see messages posted there more easily. This is done by updating the Room's Membership.

  1. At left, find the Memberships category, then click
    (or click https://developer.webex.com/docs/api/v1/memberships/create-a-membership)
  2. In the request at right, uncheck the Use personal access token setting.
  3. In the Bearer box, paste your Bot's access token.
  4. In the roomID field, enter the id of the previously created room. You can look up the ID by using the List Rooms request using the Bot's access token.
  5. In the personEmail field, you can enter our sample account's email address: pod5@ltrcol2574.33mail.com, or, optionally, if you have Webex available to you, enter your own email address.
  6. De-select the isModerator selection.
  7. Click Run.
  8. Observe the response, a 200 OK. If you have Webex on your phone, you should see that you've been added (or an email to invite you to join)

Step 4 - Send a Message to the Space using Bot

  1. On the left side, find the Messages category, then click
    (or click https://developer.webex.com/docs/api/v1/messages/create-a-message)
  2. In the request at right, uncheck the Use personal access token setting.
  3. In the Bearer box, paste your Bot's access token.
  4. In the roomID field, enter the id of the previously created room. You can look up the Room ID by using the List Rooms request.
  5. While Markdown and even attachments are supported, for simplicity, we will edit the text field and enter Test Update
  6. Click Run
  7. You should receive a 200 OK with information about the message sent.

Step 5 - Verify Message was Sent

If you set up notifications and see the message in the Webex Space, then you know the previous step worked. You can furthermore access these messages via API.

Depending on which user was added to the Space, you need to launch that client.

  • The Webex app should be already installed and running on the student PC (and is probably blinking with a new message notification). If not, you can launch it and log in using email: pod5@ltrcol2574.33mail.com and password: c1sco123
  • Alternatively, if you added your personal account to the Space, you can simply open Webex to see the new Space.

Webex Api For Developers

In either case, you should see a new HOLCOL-2574 Notifications Space that you can enter, where you should see the Test Update message from your Pod5 Test Bot.

Webex Api Integration

Webex api integration

Webex Api Developer Jobs

Now you have completed the overview of Webex, as well as the other APIs. You are ready to build a web portal page that performs some of these operations programmatically.