Skip to main content
The Webex Messaging integration lets your application send Novu workflow notifications to Webex rooms and direct conversations. Your users authorize a Webex integration through OAuth, and Novu stores the resulting connection securely, refreshes its access token when needed, and routes each message to the room or person endpoint you register.

Send to rooms

Deliver plain text or Markdown notifications to a room or an existing message thread.

Send direct messages

Link a subscriber through OAuth or identify the recipient by Webex person ID or email.

Prerequisites

  • A Webex developer account.
  • Permission to create a Webex integration.
  • A Novu environment and secret key.
  • A Webex room ID for room notifications, or a Webex person ID or email for direct notifications.

Configure a Webex integration

Webex integrations use OAuth 2.0 to act on behalf of an authorized Webex user. The user who authorizes the connection must be able to access the rooms and people you want to target.

Create the integration in Webex

1

Open My Webex Apps

Sign in to the Webex for Developers portal and open My Webex Apps.
2

Create a new integration

Select Create a New App, then choose Create an Integration.
3

Enter the application details

Add a user-facing name, icon, and description. Webex displays this information on the authorization screen.
4

Add the Novu redirect URI

Register the callback URI for the region where your Novu environment is hosted.
Create and configure a Webex integration
5

Select OAuth scopes

Select the following scopes:
  • spark:messages_write
  • spark:rooms_read
  • spark:people_read
  • spark:memberships_read
Webex adds spark:kms to registered integrations. Novu includes it when generating the authorization URL because Webex requires it for encrypted message content.Select the OAuth scopes required by Webex Messaging
6

Create the integration

Save the integration, then copy its Client ID and Client Secret.
Webex shows the Client Secret only once. Store it securely before leaving the integration page.
Novu requests these scopes by default:
ScopeHow Novu uses it
spark:messages_writeSend room and direct messages.
spark:rooms_readAllow your application to discover rooms before registering a room endpoint.
spark:people_readResolve the authorized Webex person and support direct-message linking.
spark:memberships_readAllow your application to inspect room membership when choosing destinations.
spark:kmsAccess encrypted Webex content. Webex requires this scope for integrations that interact with messages.
For more information, see Webex Integrations and Authorization.

Configure Webex Messaging in Novu

1

Open the Novu dashboard

Sign in to the Novu Dashboard.
2

Open the Integrations Store

In the sidebar, select Integrations Store, then click Connect provider.
3

Select Webex Messaging

Choose Webex Messaging from the Chat providers.Select Webex Messaging from the Novu Chat provider catalog
4

Enter the credentials

Add the values from your Webex integration:
  • Client ID: The Webex integration client ID.
  • Client Secret: The Webex integration client secret.
  • Redirect URL (optional): Where Novu sends the browser after OAuth succeeds. If omitted, Novu displays a success page.
  • Base URL (optional): Leave empty to use https://webexapis.com/v1. Configure Webex Messaging credentials in the Novu Integration Store
5

Create the Novu integration

Save the integration. The examples below use webex-messaging as its integration identifier. Replace it if you chose a different identifier.
The optional Redirect URL in Novu is different from the Webex redirect URI. Webex must redirect to Novu’s regional OAuth callback. The Novu field controls where the user goes after Novu finishes the callback.

Connect a Webex organization

Create a channel connection before registering room or person endpoints. Providing your own connectionIdentifier makes it easy to reference the connection later. The following example creates a shared connection for the acme context. Call it from your backend when an administrator or authorized user clicks Connect Webex in your application.
Open the returned URL when the user is ready to authorize Webex:
The generated OAuth URL expires after 5 minutes. Generate a new URL each time a user starts the connection flow; do not cache it.
After authorization, Novu exchanges the code, reads the authorized person’s Webex organization, and stores the access and refresh tokens on the connection. Novu refreshes the access token automatically before message delivery when it is close to expiring. For a subscriber-scoped connection, set autoLinkUser to true. Novu creates the connection and a webex_person endpoint for the Webex person who completes OAuth.
Use a separate link-user flow when the Webex organization is already connected and another subscriber needs a personal endpoint.
The subscriber signs in to Webex through the returned URL. Novu reads their identity from people/me and creates a webex_person endpoint linked to the existing connection.

Choose delivery destinations

Every Webex endpoint must reference a Webex Messaging connection through connectionIdentifier. If the connection has a Novu context, the endpoint must use the same context.

Send to a Webex room

Use the Webex Rooms API or a room picker in your application to obtain the room ID. The authorizing Webex user must be a member of the room. Create a webex_room endpoint for the subscriber and context that should receive messages:
To send every notification from an endpoint as a reply in an existing Webex thread, add the parent message ID:

Send to a Webex person

The recommended approach is to use autoLinkUser or the link-user OAuth flow. These flows identify the person who signs in and create the endpoint automatically. You can also create a webex_person endpoint manually. Provide exactly one of personId or personEmail.

Send notifications

Create a workflow with a Chat step and select the Webex Messaging integration. After the matching connection and endpoint exist, trigger the workflow with the same subscriber and context.
When the workflow runs, Novu resolves matching Webex endpoints, obtains a valid access token from the referenced connection, and posts the Chat step body to the Webex Messages API.

Format Webex messages

The dashboard Chat step sends its body as Webex text. Use trigger overrides when you need Webex-specific message fields such as markdown, files, or attachments. The example below adds Webex Markdown to a specific Chat step:
Replace webex-chat-step with the Chat step identifier from your workflow.
Routing fields come only from the registered channel endpoint. Webex passthrough data cannot add, remove, or override roomId, parentId, toPersonId, or toPersonEmail.
For supported Webex payload fields, see Create a Message.

Troubleshooting

Error or symptomWhat to check
OAuth fails with an invalid redirect URIConfirm the Webex integration contains the Novu callback for the correct region. The value must match exactly.
WEBEX_INVALID_CREDENTIALSReconnect Webex. The access or refresh token may be invalid or expired.
WEBEX_INSUFFICIENT_PERMISSIONSConfirm the required scopes were selected in Webex and requested during OAuth.
WEBEX_DESTINATION_NOT_FOUNDVerify the room or person identifier and confirm the authorizing user can access that destination.
Endpoint context mismatchUse the same Novu context values on the endpoint and its referenced channel connection.
WEBEX_RATE_LIMITEDWait for the retry-after interval reported by Webex before trying again.

Webex Messages API

Review Webex message destinations, content fields, and API behavior.