Share via

Microsoft Teams API

Anonymous
2023-09-07T10:05:32+00:00

Hi,

I realised that there is a new Teams API for shortcuts like toggle mute, toggle camera etc, that works with Stream Deck very well so I don't have to have Teams in focus.

since I recently bought a new macropad I would like to know if you have any documentation on how to use the Teams API so I can develop something myself to program my macropad.

Can you point me into the right direction?

Microsoft Teams | Microsoft Teams for business | Teams for Mac

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

10 answers

Sort by: Most helpful
  1. Anonymous
    2023-09-07T10:52:42+00:00

    Hey there, my name is Ajibola and I'm excited to help you out today!

    Yes, Microsoft Teams has an API that allows you to create custom integrations with Teams. You can use the API to create custom shortcuts like toggle mute, toggle camera etc. that work with Stream Deck or any other device.

    Here are some resources that can help you get started:

    1. Microsoft Teams Developer Platform --- https://developer.microsoft.com/en-us/microsoft-teams/
    2. Microsoft Teams API Reference ---- https://docs.microsoft.com/en-us/graph/api/resources/teams-api-overview?view=graph-rest-beta
    3. Microsoft Teams App Studio ---- https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/app-studio-overview

    If you have any further questions or need additional assistance, please feel free to ask. I'm here to help!

    Give back to the Community. Help the next person who has this issue by indicating if this reply solved your problem. Click Yes or No below.

    Kind regards

    Was this answer helpful?

    8 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-09-08T14:40:23+00:00

    I did run your code, still receiving an error:

    Error: 401 - {"error":{"code":"InvalidAuthenticationToken","message":"CompactToken parsing failed with error code: 80049217","innerError":{"date":"2023-09-08T14:37:57","request-id":"16580935-fe97-4508-8dda-8e737705c815","client-request-id":"16580935-fe97-4508-8dda-8e737705c815"}}}

    it looks like your code also has some issues (it doesn't matter but you are parsing as if we were getting some books and printing them)

    I'm using the token I provided in my screenshot directly in your script

    > You’ll need to replace {token} with your authentication token and 57dab8b1-894c-409a-b240-bd8beae78896 with the ID of the call you want to mute.

    I don't need to provide any of this with the stream deck, are you sure we are talking about the same API? the one in the stream deck looks like something different

    In fact the code looks like something from ChatGPT

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2023-09-07T18:53:08+00:00

    Hello,

    If you have any further questions or need additional assistance, please feel free to ask. I'm here to help!

    Kind Regards

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2023-09-07T16:23:26+00:00

    I'm looking at this example for mute: https://learn.microsoft.com/en-us/graph/api/call-mute?view=graph-rest-beta&tabs=http

    POST https://graph.microsoft.com/beta/communications/calls/57dab8b1-894c-409a-b240-bd8beae78896/mute Content-Type: application/json

    {   "clientContext": "clientContext-value" }

    headers:

    Authorization Bearer {token}. Required.
    Content-type application/json. Required.

    the token I'm using is the one I copied from my MS Teams

    I assume the id is always this: 57dab8b1-894c-409a-b240-bd8beae78896

    this what I'm getting:

    { "error": {"code": "InvalidAuthenticationToken","message": "CompactToken parsing failed with error code: 80049217","innerError": {"date": "2023-09-07T16:11:08","request-id": "6e8d309a-5272-47d7-ad40-019a26856fe3","client-request-id": "6e8d309a-5272-47d7-ad40-019a26856fe3"}}}

    This is where I'm getting the token I'm using in the Authorization, which works well with the stream deck

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2023-09-07T15:46:56+00:00

    Hi Ajibola,

    Will give it a look, thank you

    Was this answer helpful?

    0 comments No comments