Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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}")

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

microsoft_teams_api-2.1.0a2.tar.gz (63.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

microsoft_teams_api-2.1.0a2-py3-none-any.whl (171.9 kB view details)

Uploaded Python 3

File details

Details for the file microsoft_teams_api-2.1.0a2.tar.gz.

File metadata

  • Download URL: microsoft_teams_api-2.1.0a2.tar.gz
  • Upload date:
  • Size: 63.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for microsoft_teams_api-2.1.0a2.tar.gz
Algorithm Hash digest
SHA256 c0ad4b956bbe63c9170819d1e7131475a4e4499e70e58430684b4fc85db217fa
MD5 10d0fc03d964b798119357decaa6d9f6
BLAKE2b-256 83d64cac884e36df397c3c0cb58f2c4108c9c2cc86054b8fa7b861ec1259f04d

See more details on using hashes here.

File details

Details for the file microsoft_teams_api-2.1.0a2-py3-none-any.whl.

File metadata

File hashes

Hashes for microsoft_teams_api-2.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a00895c870f8d09e1ef4f9f2396af0ee79b6c4ce1aac5b99781a6d17ac080d7
MD5 f35d6b43db14a89db9a16a062776aaaf
BLAKE2b-256 6cc75319a3d5fa716c01002fbc866eeafae79974cf63d61aceaf8ba16c6c8276

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page