microsoft-teams-api


Namemicrosoft-teams-api JSON
Version 2.0.0a3 PyPI version JSON
download
home_pageNone
SummaryAPI package for Microsoft Teams
upload_time2025-10-18 00:15:47
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseNone
keywords agents ai bot microsoft teams
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            > [!CAUTION]
> This project is in public preview. We’ll do our best to maintain compatibility, but there may be breaking changes in upcoming releases. 

# Microsoft Teams API Client

<p>
    <a href="https://pypi.org/project/microsoft-teams-api/" target="_blank">
        <img src="https://img.shields.io/pypi/v/microsoft-teams-api" />
    </a>
    <a href="https://pypi.org/project/microsoft-teams-api/" target="_blank">
        <img src="https://img.shields.io/pypi/dw/microsoft-teams-api" />
    </a>
</p>

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

<a href="https://microsoft.github.io/teams-ai" target="_blank">
    <img src="https://img.shields.io/badge/📖 Getting Started-blue?style=for-the-badge" />
</a>


## 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

```python
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

```python
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

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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "microsoft-teams-api",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "agents, ai, bot, microsoft, teams",
    "author": null,
    "author_email": "Microsoft <TeamsAISDKFeedback@microsoft.com>",
    "download_url": "https://files.pythonhosted.org/packages/6a/92/11d6bf07ecf405f8890f4907ea138047615fbe7a5eeaa2c508312ad0ef7b/microsoft_teams_api-2.0.0a3.tar.gz",
    "platform": null,
    "description": "> [!CAUTION]\n> This project is in public preview. We\u2019ll do our best to maintain compatibility, but there may be breaking changes in upcoming releases. \n\n# Microsoft Teams API Client\n\n<p>\n    <a href=\"https://pypi.org/project/microsoft-teams-api/\" target=\"_blank\">\n        <img src=\"https://img.shields.io/pypi/v/microsoft-teams-api\" />\n    </a>\n    <a href=\"https://pypi.org/project/microsoft-teams-api/\" target=\"_blank\">\n        <img src=\"https://img.shields.io/pypi/dw/microsoft-teams-api\" />\n    </a>\n</p>\n\nCore API client library for Microsoft Teams Bot Framework integration.\nProvides HTTP clients, authentication, and typed models for Teams Bot Framework APIs.\n\n<a href=\"https://microsoft.github.io/teams-ai\" target=\"_blank\">\n    <img src=\"https://img.shields.io/badge/\ud83d\udcd6 Getting Started-blue?style=for-the-badge\" />\n</a>\n\n\n## Features\n\n- **API Clients**: Bot, User, Conversation, Team, and Meeting clients\n- **Authentication**: ClientCredentials and TokenCredentials support\n- **Activity Models**: Typed Pydantic models for Teams activities\n- **JWT Tokens**: JsonWebToken implementation with TokenProtocol interface\n\n## Authentication\n\n```python\nfrom microsoft.teams.api import ClientCredentials, TokenCredentials\n\n# Client credentials authentication\ncredentials = ClientCredentials(\n    client_id=\"your-app-id\",\n    client_secret=\"your-app-secret\"\n)\n\n# Token-based authentication\ncredentials = TokenCredentials(\n    client_id=\"your-app-id\",\n    token=your_token_function\n)\n```\n\n## API Client Usage\n\n```python\nfrom microsoft.teams.api import ApiClient\n\n# Initialize API client\napi = ApiClient(\"https://smba.trafficmanager.net/amer/\")\n\n# Bot token operations\ntoken_response = await api.bots.token.get(credentials)\ngraph_token = await api.bots.token.get_graph(credentials)\n\n# User token operations\nuser_token = await api.users.token.get(params)\ntoken_status = await api.users.token.get_status(params)\n```\n\n## Activity Models\n\n```python\nfrom microsoft.teams.api import MessageActivity, Activity, ActivityTypeAdapter\n\n# Validate incoming activities\nactivity = ActivityTypeAdapter.validate_python(activity_data)\n\n# Work with typed activities\nif isinstance(activity, MessageActivity):\n    print(f\"Message: {activity.text}\")\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "API package for Microsoft Teams",
    "version": "2.0.0a3",
    "project_urls": {
        "Homepage": "https://github.com/microsoft/teams.py/tree/main/packages/api/src/microsoft/teams/api"
    },
    "split_keywords": [
        "agents",
        " ai",
        " bot",
        " microsoft",
        " teams"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "59e2ed6b6456e021ada5f6161b3bd455e290365f47d80a1b4e58e1954c1b8cbd",
                "md5": "17d6ab3827a6b6a989094049db209690",
                "sha256": "216d26c8bb07d021c8bc8466df7ecdaaa51fc28c3bebfb0b371de969a2bff6b5"
            },
            "downloads": -1,
            "filename": "microsoft_teams_api-2.0.0a3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "17d6ab3827a6b6a989094049db209690",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 134527,
            "upload_time": "2025-10-18T00:15:46",
            "upload_time_iso_8601": "2025-10-18T00:15:46.418986Z",
            "url": "https://files.pythonhosted.org/packages/59/e2/ed6b6456e021ada5f6161b3bd455e290365f47d80a1b4e58e1954c1b8cbd/microsoft_teams_api-2.0.0a3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6a9211d6bf07ecf405f8890f4907ea138047615fbe7a5eeaa2c508312ad0ef7b",
                "md5": "659842383595fad316ac4d35fde3da90",
                "sha256": "7096736b6064061ad415308b853a52f3d5961fdfc08bd89fee63733b9969b666"
            },
            "downloads": -1,
            "filename": "microsoft_teams_api-2.0.0a3.tar.gz",
            "has_sig": false,
            "md5_digest": "659842383595fad316ac4d35fde3da90",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 43290,
            "upload_time": "2025-10-18T00:15:47",
            "upload_time_iso_8601": "2025-10-18T00:15:47.596761Z",
            "url": "https://files.pythonhosted.org/packages/6a/92/11d6bf07ecf405f8890f4907ea138047615fbe7a5eeaa2c508312ad0ef7b/microsoft_teams_api-2.0.0a3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-18 00:15:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "microsoft",
    "github_project": "teams.py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "microsoft-teams-api"
}
        
Elapsed time: 2.96484s