wxc_sdk.guests package
- class wxc_sdk.guests.Guest(*, id: str | None = None, subject: str | None = None, displayName: str | None = None, email: str | None = None, accessToken: str | None = None, expiresIn: int | None = None, expiresAt: datetime | None = None)[source]
Bases:
ApiModel
- id: str | None
The unique id of the guest. This is a personId example: Y2lzY29zcGFyazovL3VzL1BFT1BMRS8zNzlhNWQ4ZC1hNTE4LTQ3NmQtYmY1NC1mZmE5MWQ3OWM4MTI
- subject: str | None
The external unique identifier of the guest. example: PersonNo#1
- display_name: str | None
The guest’s display name shown in Webex applications example: Person of Interest
- email: str | None
The person’s synthetic email in Webex. example: 1ad14c30-59a6-31a7-b345-963e3d167e10@appid.ciscospark.com
- access_token: str | None
The guests access token. Guest tokens usually are over 2000 characters in length. example: eyJhbGciOiJSUzI1NiJ9.eyJkw1zx5iIDv7FL3cWQ_JEjehqtPVRmFf572q7RZwSIZgQRziAw
- expires_in: int | None
The token expiration in seconds from the time of issuance. example: 64799
- expires_at: datetime | None
expiration, calculated at time of guest creation
- class wxc_sdk.guests.GuestManagementApi(*, session: RestSession, base: str | None = None)[source]
Bases:
ApiChild
Guest Management
Guests in Webex are users with only a temporary identity and are often used for single-transaction collaborations. Examples include click-to-call and click-to-chat applications where the guest interacts with the agent only for the duration of the call or chat session. Guests in Webex are created and managed via a Service App with the scope guest-issuer:write and guest-issuer:read and are represented by a token with a fixed and predefined set of scopes.
Since the Service App manages its own pool of guests, you need to insert the Service App token into the developer portal’s Try-It mode rather than your default personal token.
The guests/token endpoint is used to create and retrieve guest tokens, and the guests/count is used to assess the number of current guests.
Creating guests via the guest-issuer application type is deprecated and will be removed in the future.
- create(subject: str, display_name: str) Guest [source]
Create a Guest
Create a new token for a single guest user. The Service App that creates the guest must have the scope guest-issuer:write.
Guests are implicitly created by retrieving the guest access token.
Repeated calls to this API with the same subject will create additional tokens without invalidating previous ones. Tokens are valid until the expiresIn.
Guests can be renamed by supplying the same subject and changing the displayName.
To retrieve a new token for an existing guest, please provide the existing guest’s subject. Tokens are valid until expiresIn.
- Parameters:
subject (str) – The unique and external identifier of the guest.
display_name (str) – The display name shown in the Webex application.
- Return type:
- guest_count() int [source]
Get Guest Count
To retrieve the number of guests, the scopes guest-issuer:read or guest-issuer:write are needed.
- Return type:
int
- base = 'guests'