Embedded Apps API Reference

Classes
WebexAppsApplication

Webex Embedded app instance.

Context

Context object that exposes user, meeting, and space information.

Application

Application object

WebexAppsMeeting

Webex Embedded Apps meeting instance.

WebexAppsSpace

Webex Embedded Apps Space instance.

WebexAppsUser

Webex Embedded Apps user instance.

Events
"application:shareStateChanged"

Event fired when the sharing state changes.

"application:displayContextChanged"

Event fired when rendering context changes, for example, when a user pops out the sidebar.

"application:themeChanged"

Event fired when the application theme changes.

"meeting:infoChanged"

Event fired when meeting information has changed for the given meeting.

"meeting:roleChanged"

Event fired when the role for the current participant changes.

"space:infoChanged"

Event fired when space information changes, for instance the space title.

WebexAppsApplication

Webex Embedded app instance.

Kind: global class


webexAppsApplication.states : array

Kind: instance constant of WebexAppsApplication
Read only: true
Properties

Name
states

states.deviceType : string

Kind: static constant of states
Read only: true
Properties

NameDescription
deviceTypeThe given device form factor. One of DESKTOP, MOBILE, or BROWSER.

states.displayContext : string

Kind: static constant of states
Read only: true
Properties

NameDescription
displayContextDisplay context (frame) in which the 3rd party app is being rendered. One of the following strings "MEETING_SIDEBAR", "MEETING_STANDALONE_WINDOW", "MEETING_MAINVIEW", or "SPACETAB". Default is "MEETING_SIDEBAR".

states.isPrivateDataAvailable : boolean

Kind: static constant of states
Read only: true
Properties

NameDescription
isPrivateDataAvailableIndicates if real Ids are being used or derived ids are avaliable. This is based on the ControlHub setting for the given app.

states.capabilities : Array.<string>

A combination of TOUCH, SHARED_SYSTEM, MULTIPLE_USER_SYSTEM, and VIEW_ONLY.

Kind: static constant of states
Read only: true
Properties

NameDescription
capabilitiesIndicates the capabilities of the given device. Currently not in use and subject to change. An empty string array is returned.

states.isShared : boolean

TRUE = share is ongoing; FALSE = share is not taking place.

Kind: static constant of states
Read only: true
Properties

NameDescription
isSharedIndicates if the embedded app’s link (specified using the setShareUrl method) has been added to the meeting or space by the user.

states.theme : string

Kind: static constant of states
Read only: true
Properties

NameDescription
themeIndicates the given theme of the given meetings client, either Theme.LIGHT, or Theme.DARK.

states.language : string

Kind: static constant of states
Read only: true
Properties

NameDescription
languageIndicates the given language being used by the given meetings client. Example values: "en-US", "da-DK", etc.

states.sdkVersion : string

Kind: static constant of states
Read only: true
Properties

NameDescription
sdkVersionIndicates the SDK version the given meetings client implements. Example values: "1.x" for 41.6 to 41.9.

states.about : string

Kind: static constant of states
Read only: true
Properties

NameDescription
aboutGeneral information about the host. This format is subject to change and should only be used for diagnostic purposes.

Context

Context object that exposes user, meeting, and space information.

Kind: global class


context.getUser() ⇒ Promise.<User, ErrorCodes>

A promise for a User object or ErrorCode if rejected

Kind: instance method of Context
Fulfill: User - A User object
Reject: ErrorCode, 0 = SUCCESS, 1 = GENERIC_ERROR
Since: 1.0.0


context.getMeeting() ⇒ Promise.<Meeting, ErrorCodes>

A promise for a Meeting object or ErrorCode if rejected.

Kind: instance method of Context
Fulfill: Meeting - A Meeting object
Reject: ErrorCode, 0 = SUCCESS, 1 = GENERIC_ERROR
Since: 1.0.0


context.getSpace() ⇒ Promise.<Space, ErrorCodes>

A promise for a Space object or ErrorCode if rejected.

Kind: instance method of Context
Fulfill: Space - A Space object
Reject: ErrorCode, 0 = SUCCESS, 1= GENERIC_ERROR, 5 = BAD_CONTEXT (No space available in the given context)
Since: 1.1.0


Application

Application object

Kind: global class


application.deviceType : string

Kind: instance constant of Application
Read only: true
Properties

NameDescription
deviceTypeThe given device form factor. One of [DESKTOP

application.isPrivateDataAvailable : boolean

Kind: instance constant of Application
Read only: true
Properties

NameDescription
isPrivateDataAvailableIndicates if real Ids are being used or derived ids are avaliable. This is based on the ControlHub setting for the given app.

application.displayContext : string

Kind: instance constant of Application
Read only: true
Properties

NameDescription
displayContextDisplay context (frame) in which the 3rd party app is being rendered. One of the following strings "MEETING_SIDEBAR", "MEETING_STANDALONE_WINDOW", "MEETING_MAINVIEW", or "SPACETAB". Default is "MEETING_SIDEBAR".

application.isShared : boolean

TRUE = share is ongoing; FALSE = share is not taking place.

Kind: instance constant of Application
Read only: true
Properties

NameDescription
isSharedIndicates if the embedded app’s link (specified using the setShareUrl method) has been added to the meeting or space by the user.

application.capabilities : Array.<string>

A combination of TOUCH, SHARED_SYSTEM, MULTIPLE_USER_SYSTEM, and VIEW_ONLY.

Kind: instance constant of Application
Read only: true
Properties

NameDescription
capabilitiesIndicates the capabilities of the given device. Currently not in use and subject to change. An empty string array is returned.

application.sdkVersion : string

Kind: instance constant of Application
Read only: true
Properties

NameDescription
sdkVersionIndicates the SDK version the given meetings client implements. Example values: "1.x" for 41.6 to 41.9.

application.theme : string

Kind: instance constant of Application
Read only: true
Properties

NameDescription
themeIndicates the given theme of the given meetings client, either Theme.LIGHT, or Theme.DARK.

application.about : string

Kind: instance constant of Application
Read only: true
Properties

NameDescription
aboutGeneral information about the host. This format is subject to change and should only be used for diagnostic purposes.

application.language : string

Kind: instance constant of Application
Read only: true
Properties

NameDescription
languageIndicates the given language being used by the given meetings client. Example values: "en-US", "da-DK", etc.

application.setShareUrl(internalUrl, externalUrl, title, optionals) ⇒ Promise.<ErrorCodes>

Sets the embedded app url which will be shared with other participants. Enables the "Open together" button in the UI. A user can decide when to share the url interacting with the UI.

Kind: instance method of Application
Returns: Promise.<ErrorCodes> - - 0 = SUCCESS, 1 = GENERIC_ERROR (call fails but arguments are correct), 2 = INVALID_ARGUMENT
Since: 1.1.0

ParamTypeDescription
internalUrlstring= URL to share with participants (Max length: 2083 characters)
externalUrlstringURL to support UX like “open in system browser”, “open mobile app” (Max length: 2083 characters).
titlestringWindow title (max length 256 characters)
optionalsobjectEmpty JSON object, not currently used.

application.clearShareUrl()

Kind: instance method of Application
Summary: Clears the URL that was previously set using setShareUrl.
Since: 1.1.0


application.on(eventName, callback)

Kind: instance method of Application
Summary: Called when a given event is raised.
Since: 1.1.0

ParamTypeDescription
eventNamestringone of the supported events
callbackfunctionFunction called when a given event is raised. Callback function will carry the event data.

application.off(eventName)

Kind: instance method of Application
Summary: Stop listening to a given event.
Since: 1.1.0

ParamTypeDescription
eventNamestringName of the event to stop listening to.

application.listen() ⇒ Promise.<void>

Kind: instance method of Application
Summary: Register to listen for incoming events.
Fulfill: Since: 1.1.0


application.stopListening()

Kind: instance method of Application
Summary: Stop listening to all events.
Since: 1.1.0


application.onReady() ⇒ Promise.<void>

Kind: instance method of Application
Summary: Called when the Webex.Application object has been initialized and the SDK is ready for 3rd party consumption.
Fulfill: Since: 1.1.0


Application.ErrorCodes

All the error codes for class Application

Kind: static property of Application


WebexAppsMeeting

Webex Embedded Apps meeting instance.

Kind: global class


WebexAppsSpace

Webex Embedded Apps Space instance.

Kind: global class


webexAppsSpace.states : array

Kind: instance constant of WebexAppsSpace
Read only: true
Properties

Name
states

states.id : string

Kind: static constant of states
Read only: true
Properties

NameDescription
idSpace id. Can be a real space id or a derived space id. If isPrivateDataAvailable is true then the real id is used, otherwise the derived id is used.

states.title : string

Kind: static constant of states
Read only: true
Properties

NameDescription
titleTitle of the given space; blank if isPrivateDataAvailable is false.

WebexAppsUser

Webex Embedded Apps user instance.

Kind: global class


webexAppsUser.states : array

Kind: instance constant of WebexAppsUser
Read only: true
Properties

Name
states

states.id : string

Kind: static constant of states
Read only: true
Properties

NameDescription
idUser id. Can be a real user id or a derived user id if isPrivateDataAvailable is false.

states.orgId : string

Kind: static constant of states
Read only: true
Properties

NameDescription
orgIdOrg id. Can be a real organization id or a derived org id if isPrivateDataAvailable if false.

states.email : string

Kind: static constant of states
Read only: true
Properties

NameDescription
emailEmail of the given user or blank if isPrivateDataAvailable is false.

states.displayName : string

Kind: static constant of states
Read only: true
Properties

NameDescription
displayNameDisplay name of the given user or blank if isPrivateDataAvailable is false.

states.token : string

Kind: static constant of states
Read only: true
Properties

NameDescription
tokenJWT token for the given user.

"application:shareStateChanged"

Event fired when the sharing state changes.

Kind: event emitted
Properties

NameTypeDescription
isSharedbooleanIndicates if sharing is taking place.

"application:displayContextChanged"

Event fired when rendering context changes, for example, when a user pops out the sidebar.

Kind: event emitted
Properties

NameTypeDescription
displayContextstringIndicates the new display context.

"application:themeChanged"

Event fired when the application theme changes.

Kind: event emitted
Properties

NameTypeDescription
themestringIndicates the current theme, LIGHT or DARK.

"meeting:infoChanged"

Event fired when meeting information has changed for the given meeting.

Kind: event emitted
Properties

NameType
webex.application.meetingobject

"meeting:roleChanged"

Event fired when the role for the current participant changes.

Kind: event emitted
Properties

NameTypeDescription
userRolesstringUser role.

"space:infoChanged"

Event fired when space information changes, for instance the space title.

Kind: event emitted
Properties

NameType
webex.application.spaceobject