How to get the token in order to call users/ME/conversations/{conversation_id}

%3CLINGO-SUB%20id%3D%22lingo-sub-1279400%22%20slang%3D%22en-US%22%3EHow%20to%20get%20the%20token%20in%20order%20to%20call%20users%2FME%2Fconversations%2F%7Bconversation_id%7D%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1279400%22%20slang%3D%22en-US%22%3E%3CBLOCKQUOTE%3EHi%2C%26nbsp%3B%3CBR%20%2F%3EWe%20are%20working%20on%20some%20Teams%20use%20case%20where%20we%20need%20to%20update%20the%20channel%20message.%20I%20have%20found%20one%20of%20conversation%20in%20Teams%20Developer%20community%20and%20found%20we%20can%20call%20below%20API.%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fteams-developer%2Fblock-a-message-in-microsoft-teams%2Fm-p%2F961372%23%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fteams-developer%2Fblock-a-message-in-microsoft-teams%2Fm-p%2F961372%23%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EPUT%20%22%3CA%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Fapac.ng.msg.teams.microsoft.com%2Fv1%2F%3C%2FA%3E%3C%2FBLOCKQUOTE%3E%3CBLOCKQUOTE%3E%3CA%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Eusers%2FME%2Fconversations%2F%7Bconversation_id%7D%40unq.gbl.spaces%2Fmessages%2F%7Bmessage_id%7D%3C%2FA%3E%22%3CBR%20%2F%3E%22%7B%22%22content%22%22%3A%22%22your-text%22%22%2C%22%22messagetype%22%22%3A%22%22Text%22%22%2C%22%22contenttype%22%22%3A%22%22text%22%22%2C%22%22amsreferences%22%22%3A%5B%5D%2C%22%22clientmessageid%22%22%3A%22%22the_origin_id%22%22%2C%22%22imdisplayname%22%22%3A%22%22the_origin_name%22%22%2C%22%22properties%22%22%3A%7B%22%22importance%22%22%3A%22%22%22%22%2C%22%22subject%22%22%3Anull%7D%7D%22%3CP%20class%3D%221585933576716%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%221585933576716%22%3EBut%20in%20order%20to%20call%20this%20API%2C%20we%20need%20user%20token.%20Is%20there%20any%20way%20to%20get%20it%3F%3C%2FP%3E%3CP%20class%3D%221585933576716%22%3E%26nbsp%3B%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1279400%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EChat%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1283637%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20the%20token%20in%20order%20to%20call%20users%2FME%2Fconversations%2F%7Bconversation_id%7D%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1283637%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F607706%22%20target%3D%22_blank%22%3E%400bs33%3C%2FA%3E%26nbsp%3B%2C%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20am%20not%20sure%20about%20the%20skype%20API%20endpoint%2C%20but%20in%20order%20to%20update%20conversation%20in%20Ms%20Teams%20you%20can%20make%20use%20of%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fgroup-update-thread%3Fview%3Dgraph-rest-1.0%26amp%3Btabs%3Dhttp%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eupdate%20conversation%20thread%20graph%20API%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlso%20please%20have%20a%20look%20into%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fresources%2Fconversation%3Fview%3Dgraph-rest-1.0%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EGraph%20API%20for%20conversation%20thread%3C%2FA%3E%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1283981%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20the%20token%20in%20order%20to%20call%20users%2FME%2Fconversations%2F%7Bconversation_id%7D%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1283981%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F451628%22%20target%3D%22_blank%22%3E%40subhasish-MSFT%3C%2FA%3E%2C%20for%20your%20reply%2C%20but%20group%20conversations%20and%20teams%20conversations%20are%20different%2C%20though%20it%20looks%20similar%20in%26nbsp%3B%20API%20signature.%20If%20you%20query%20for%20all%20thread%20of%20a%20group%20using%26nbsp%3B%3CSPAN%3EGET%20%2Fgroups%2F%7Bid%7D%2Fthreads%2F%7Bid%7D%2C%20you%20won't%20get%20the%20teams%20channel%20messages.%20I%20have%20tried%20it.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1284447%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20get%20the%20token%20in%20order%20to%20call%20users%2FME%2Fconversations%2F%7Bconversation_id%7D%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1284447%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F607706%22%20target%3D%22_blank%22%3E%400bs33%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20is%20a%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fchannel-list-messages%3Fview%3Dgraph-rest-beta%26amp%3Btabs%3Dhttp%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ebeta%20graph%20API%20to%20get%20all%20messages%20in%20a%20channel%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EEnd%20Point%3A%20%2Fteams%2F%7Bid%7D%2Fchannels%2F%7Bid%7D%2Fmessages.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EHope%20it%20helps.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor
Hi, 
We are working on some Teams use case where we need to update the channel message. I have found one of conversation in Teams Developer community and found we can call below API.
https://techcommunity.microsoft.com/t5/teams-developer/block-a-message-in-microsoft-teams/m-p/961372...

PUT "https://apac.ng.msg.teams.microsoft.com/v1/
users/ME/conversations/{conversation_id}@unq.gbl.spaces/messages/{message_id}"
"{""content"":""your-text"",""messagetype"":""Text"",""contenttype"":""text"",""amsreferences"":[],""clientmessageid"":""the_origin_id"",""imdisplayname"":""the_origin_name"",""properties"":{""importance"":"""",""subject"":null}}"

 

But in order to call this API, we need user token. Is there any way to get it?

 

3 Replies
Highlighted

@0bs33 , 

I am not sure about the skype API endpoint, but in order to update conversation in Ms Teams you can make use of update conversation thread graph API.

 

Also please have a look into Graph API for conversation thread  

Highlighted

Thanks @subhasish-MSFT, for your reply, but group conversations and teams conversations are different, though it looks similar in  API signature. If you query for all thread of a group using GET /groups/{id}/threads/{id}, you won't get the teams channel messages. I have tried it.

Highlighted

@0bs33 ,

 

There is a beta graph API to get all messages in a channel.

End Point: /teams/{id}/channels/{id}/messages.

Hope it helps.