Error Call Protected APIs

MANH THANG VU 61 Reputation points
2022-04-05T03:06:19.647+00:00

I have submitted a registration form using Protected APIs, but have not received a response yet. Currently I am trying to call these APIs however the data returns an error message: "Requested API is not supported in delegated context".
Is it necessary to use bot token to call API?

GET https://graph.microsoft.com/v1.0/users/{id}/chats/getAllMessages
GET https://graph.microsoft.com/v1.0/teams/{id}/channels/getAllMessages

189936-image.png

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,376 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,965 questions
0 comments No comments
{count} votes

Accepted answer
  1. Meghana-MSFT 3,811 Reputation points Microsoft Vendor
    2022-04-05T15:38:41.42+00:00

    @MANH THANG VU -

    1. Please note the below information related to protected API access - 190312-image.png
    2. Please note that channel: getAllMessages, chats: getAllMessages are supported only in application context. So you need to get a token and call the api.

    Thanks,
    Meghana


    If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.


1 additional answer

Sort by: Most helpful
  1. MANH THANG VU 61 Reputation points
    2022-04-06T02:41:23.6+00:00

    @Meghana-MSFT
    I use ngrok (https://3928-14-175-119-223.ngrok.io) to do redirect_uri but it doesn't work, can you recommend me some service to generate redirect_uri? Thank you!

    0 comments No comments