Hi @Samarth S Hegade
As your error message indicates, application permissions are only supported for migration messages. This means that if you use application permissions, you need to create the team and channel in a migrated state and then import the messages.
If you are simply sending messages on behalf of the logged-in user, grant the calling application the
ChannelMessage.Send
delegation permission and use a delegated authentication flow (auth code flow or ROPC flow) to request an access token.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.