MsTeamsClient reference
Complete reference for the Microsoft Teams client in the Knock JavaScript SDK.
Client for interacting with Microsoft Teams integration operations in the Knock API.
Constructor
#Initializes a new Microsoft Teams client instance.
Parameters:
The Knock client instance to use for API requests.
Returns: MsTeamsClient
Methods
#authCheck
#Checks the authentication status for a Microsoft Teams channel integration.
Parameters:
The tenant identifier to check authentication for.
The Knock channel ID for the Microsoft Teams integration.
Returns: Promise<ApiResponse>
Example:
getTeams
#Retrieves available Microsoft Teams teams for the authenticated integration.
Parameters:
The Knock channel ID for the Microsoft Teams integration.
The tenant identifier.
Optional Microsoft Graph API query parameters for filtering and pagination.
Query Options:
OData filter expression to filter teams (e.g., 'displayName eq 'Marketing Team').
Comma-separated list of properties to include in the response.
Maximum number of teams to return.
Pagination token for retrieving the next set of results.
Returns: Promise<GetMsTeamsTeamsResponse>
Example:
getChannels
#Retrieves available Microsoft Teams channels for a specific team.
Parameters:
The Knock channel ID for the Microsoft Teams integration.
The Microsoft Teams team ID to get channels for.
The tenant identifier.
Optional Microsoft Graph API query parameters for filtering.
Query Options:
OData filter expression to filter channels (e.g., 'membershipType eq 'standard').
Comma-separated list of properties to include in the response.
Returns: Promise<GetMsTeamsChannelsResponse>
Example:
revokeAccessToken
#Revokes the access token for a Microsoft Teams integration, effectively disconnecting it.
Parameters:
The tenant identifier.
The Knock channel ID for the Microsoft Teams integration to revoke access for.
Returns: Promise<ApiResponse>
Example: