I want to get messages from teams public channel. I can get messages from the one which I am part of, but i want to retrieve messages from public channel which i am not part of.
There are few apis available on microsoft: https://learn.microsoft.com/en-us/graph/api/channel-list-messages?view=graph-rest-1.0&tabs=http https://learn.microsoft.com/en-us/graph/api/chatmessage-delta?view=graph-rest-1.0&tabs=http
I created a app with all the appropriate application permissions. I also requested for protected apis request from microsoft(https://learn.microsoft.com/en-us/graph/teams-protected-apis).
But i still cannot get all the public channel messages and keep getting below error:
"response": {
"error": {
"code": "Forbidden",
"message": "UnknownError",
"innerError": {
"date": "2022-06-30T00:48:11",
"request-id": "25360f0f-xxxx-xxxx-xxxx-78fa36f30f1c",
"client-request-id": "25360f0f-xxxx-xxxx-xxxx-78fa36f30f1c"
}
}
}
any help will be much appriciated.