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.0

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.0
File Size Uploaded Provenance Actions
microsoft_teams_api-2.2.0.tar.gz 68.7 kB Without provenance Details for microsoft_teams_api-2.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 251.7 kB

Release files / microsoft_teams_api-2.2.0.tar.gz

Download URL microsoft_teams_api-2.2.0.tar.gz
Size 68.7 kB
Tags Source
SHA-256 checksum
How to use checksums
df8f483841654f0ffa66e6f66a83893cdc97d35ef6175bbf9ca58562a5ecf5e3
BLAKE2b-256 checksum
How to use checksums
b94a860ef97973ee0c8fe0dfd684094f8033d2cadba32c160641d49a18004c70
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.0-py3-none-any.whl

Download URL microsoft_teams_api-2.2.0-py3-none-any.whl
Size 183.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8dd3d97a0a944211aa19d8360c2eb52c6c2a8b0fb16edf7d4ed939cd2112cce5
BLAKE2b-256 checksum
How to use checksums
1fb03754a2eff436d2aee8562f071ef1be4ca807cf394a22850fc0f38571c001
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.0

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.0 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