Skip to main content

Microsoft Teams API Client

Core API client library for Microsoft Teams Bot Framework integration. Provides HTTP clients, authentication, and typed models for Teams Bot Framework APIs.

Features

  • API Clients: Bot, User, Conversation, Team, and Meeting clients
  • Authentication: ClientCredentials and TokenCredentials support
  • Activity Models: Typed Pydantic models for Teams activities
  • JWT Tokens: JsonWebToken implementation with TokenProtocol interface

Authentication

from microsoft_teams.api import ClientCredentials, TokenCredentials

# Client credentials authentication
credentials = ClientCredentials(
    client_id="your-app-id",
    client_secret="your-app-secret"
)

# Token-based authentication
credentials = TokenCredentials(
    client_id="your-app-id",
    token=your_token_function
)

API Client Usage

from microsoft_teams.api import ApiClient

# Initialize API client
api = ApiClient("https://smba.trafficmanager.net/amer/")

# Bot token operations
token_response = await api.bots.token.get(credentials)
graph_token = await api.bots.token.get_graph(credentials)

# User token operations
user_token = await api.users.token.get(params)
token_status = await api.users.token.get_status(params)

Activity Models

from microsoft_teams.api import MessageActivity, Activity, ActivityTypeAdapter

# Validate incoming activities
activity = ActivityTypeAdapter.validate_python(activity_data)

# Work with typed activities
if isinstance(activity, MessageActivity):
    print(f"Message: {activity.text}")

Metadata

Release files for microsoft-teams-api 2.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for microsoft-teams-api 2.2.1
File Size Uploaded Provenance Actions
microsoft_teams_api-2.2.1.tar.gz 68.7 kB Without provenance Details for microsoft_teams_api-2.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for microsoft-teams-api 2.2.1
File Interpreter ABI Platform Actions
microsoft_teams_api-2.2.1-py3-none-any.whl Python 3 none any Details for microsoft_teams_api-2.2.1-py3-none-any.whl

Total release size: 251.7 kB

Release files / microsoft_teams_api-2.2.1.tar.gz

Download URL microsoft_teams_api-2.2.1.tar.gz
Size 68.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b56c1e8dbe5e1ec121e395a50a537fbf64367f5cd585814f148cd1b562ca3b8c
BLAKE2b-256 checksum
How to use checksums
183b52ed098c108855d2e1d18c6b7781500a89b34507f1457dc7903cb97286d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / microsoft_teams_api-2.2.1-py3-none-any.whl

Download URL microsoft_teams_api-2.2.1-py3-none-any.whl
Size 183.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2cc5dfbfc80499e367efa2d761a8ecb12ca613c1aee003d77109975b45cc734a
BLAKE2b-256 checksum
How to use checksums
11647c673eda5e1596509057fc92927c2e27977d20c508ad643bbae13667268a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Security for microsoft-teams-api 2.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page