Skip to main content

API package for Microsoft Teams

Project description

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

Project details


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.0.0.tar.gz (48.9 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.0.0-py3-none-any.whl (145.0 kB view details)

Uploaded Python 3

File details

Details for the file microsoft_teams_api-2.0.0.tar.gz.

File metadata

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

File hashes

Hashes for microsoft_teams_api-2.0.0.tar.gz
Algorithm Hash digest
SHA256 e138aafb6b5703430e0df8051340de7196dd26c421f8077bf82df6991497a7d1
MD5 1038460ee10b72af68285f83ccbca7fc
BLAKE2b-256 53b0356180aaed3bb5ef6efabe4d7ce0fe4b701d301d1e37cd8d5a9b0ccf49c3

See more details on using hashes here.

File details

Details for the file microsoft_teams_api-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for microsoft_teams_api-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48922ed49d5db5f78adb97c874eaed51cbebcdde79b9793a1ef1bc5c78eaf3ce
MD5 ea27938fb179f1388dfa1ddcc25ad63b
BLAKE2b-256 ff9f85a54cff3d86644a3e0cc360ab0fdedf98e3a1011b00b305beb717532027

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 Pingdom Monitoring Sentry Error logging StatusPage Status page