HttpServer Class
Core Teams HTTP server. Not a plugin — owned directly by the App.
Manages an HttpServerAdapter instance and handles JWT validation and activity processing for the Teams protocol.
Constructor
HttpServer(adapter: HttpServerAdapter, messaging_endpoint: str = '/api/messages')
Parameters
| Name | Description |
|---|---|
|
adapter
Required
|
|
|
messaging_endpoint
|
Default value: /api/messages
|
Methods
| handle_request |
Handle incoming activity request. Public so plugins (e.g. BotBuilder) can route through SDK auth. |
| initialize |
Set up JWT validation and register the messaging endpoint route. |
handle_request
Handle incoming activity request. Public so plugins (e.g. BotBuilder) can route through SDK auth.
async handle_request(request: HttpRequest) -> HttpResponse
Parameters
| Name | Description |
|---|---|
|
request
Required
|
|
initialize
Set up JWT validation and register the messaging endpoint route.
initialize(credentials: ClientCredentials | TokenCredentials | ManagedIdentityCredentials | FederatedIdentityCredentials | None = None, skip_auth: bool = False, cloud: CloudEnvironment | None = None) -> None
Parameters
| Name | Description |
|---|---|
|
credentials
|
App credentials for JWT validation. Default value: None
|
|
skip_auth
|
Whether to skip JWT validation. Default value: False
|
|
cloud
|
Optional cloud environment for sovereign cloud support. Default value: None
|
Attributes
adapter
The underlying HttpServerAdapter.
messaging_endpoint
The URL path for the Teams messaging endpoint.
on_request
Callback set by App to process activities.