A new chat with default message

%3CLINGO-SUB%20id%3D%22lingo-sub-1249537%22%20slang%3D%22en-US%22%3EA%20new%20chat%20with%20default%20message%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1249537%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there!%3C%2FP%3E%3CP%3ECan%20you%20help%20me%20with%20the%20link%26nbsp%3Bto%20a%20new%20chat%20with%20default%20message%3F%3C%2FP%3E%3CP%3EI%20have%20found%20this%20example%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Ehttps%3A%2F%2Fteams.microsoft.com%2Fl%2Fchat%2F0%2F0%3Fusers%3D%3CUSER1%3E%2C%3CUSER2%3E%2C...%26amp%3BtopicName%3D%3CCHAT%20name%3D%22%22%3E%26amp%3Bmessage%3D%3CPRECANNED%20text%3D%22%22%3E%3C%2FPRECANNED%3E%3C%2FCHAT%3E%3C%2FUSER2%3E%3C%2FUSER1%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Ebut%20I%20haven't%20users%20ids%20to%20the%20moment%20I%20need%20to%20send%20message.%3CBR%20%2F%3E%3CBR%20%2F%3EActually%20I'm%20trying%20to%20provide%20some%20kind%20of%20%22sharing%20messages%20via%20ms%20teams%22.%20But%20my%20message%20can%20be%20bigger%20then%20200%20symbols%20that's%20why%20this%20kind%20of%20sharing%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CSPAN%20class%3D%22teams-share-button%22%20data-href%3D%22https%3A%2F%2Fwww.microsoft.com%2Feducation%2Fproducts%2Fteams%22%20data-msg-text%3D%22Default%20Message%22%20data-assign-title%3D%22Default%20Assignment%20Title%22%20data-assign-instr%3D%22Default%20Assignment%20Instructions%22%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Edoesn't%20suit%20me.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%3E%3CDIV%20class%3D%22gtx-trans-icon%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1249537%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EChat%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1249740%22%20slang%3D%22en-US%22%3ERe%3A%20A%20new%20chat%20with%20default%20message%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1249740%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F592538%22%20target%3D%22_blank%22%3E%40LiubovMurarova%3C%2FA%3E%26nbsp%3B%2C%20Are%20you%20trying%20to%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fconcepts%2Fbuild-and-test%2Fdeep-links%23deep-linking-to-a-chat%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Edeep%20link%20to%20chat%3C%2FA%3E%20for%20a%20specific%20user%3F%20You%20can%20get%20the%20user%20id%20from%20the%20bot%20context%2C%20the%20user%20id%20will%20a%20UPN%20or%20Email%2C%20which%20you%20can%20assign%20within%20the%20deep%20link%20url%20when%20you%20interact%20with%20the%20Bot.%20Could%20you%20please%20clarify%20few%20points%3F%3C%2FP%3E%0A%3CP%3E1.%20Are%20you%20willing%20to%20send%20the%20default%20message%20on%201%3A1%20chat%3F%3C%2FP%3E%0A%3CP%3E2.%20Is%20this%20for%20channel%20or%20group%20conversation%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1249769%22%20slang%3D%22en-US%22%3ERe%3A%20A%20new%20chat%20with%20default%20message%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1249769%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F371090%22%20target%3D%22_blank%22%3E%40Trinetra-MSFT%3C%2FA%3E%26nbsp%3B%26nbsp%3BYes%2C%20I'm%20trying%20to%20send%20the%20default%20message%20on%201%3A1%20chat%20not%20to%20channel%20or%20group%20conversation.%3CBR%20%2F%3EMay%20be%20your%20can%20help%20me%20with%20getting%20users%20id%20from%20the%20bot%20context%3F%20As%20I%20understand%20I%20need%20to%20get%20users%20list%20for%20chose%20one%20of%20them%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1263535%22%20slang%3D%22en-US%22%3ERe%3A%20A%20new%20chat%20with%20default%20message%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1263535%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F592538%22%20target%3D%22_blank%22%3E%40LiubovMurarova%3C%2FA%3E%26nbsp%3B%2C%20Yes%2C%20you%20can%20get%20the%20user%20id%20from%20the%20Bot%20context%20please%20take%20a%20look%20at%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fresources%2Fbot-v3%2Fbots-context%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EGet%20context%20for%20you%20Bot%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi there!

Can you help me with the link to a new chat with default message?

I have found this example 

 

https://teams.microsoft.com/l/chat/0/0?users=<user1>,<user2>,...&topicName=<chat name>&message=<precanned text>

 

but I haven't users ids to the moment I need to send message.

Actually I'm trying to provide some kind of "sharing messages via ms teams". But my message can be bigger then 200 symbols that's why this kind of sharing

 

<span
    class="teams-share-button"
    data-href="https://www.microsoft.com/education/products/teams"
    data-msg-text="Default Message"
    data-assign-title="Default Assignment Title"
    data-assign-instr="Default Assignment Instructions"
></span>

 

doesn't suit me.

 
3 Replies

@LiubovMurarova , Are you trying to deep link to chat for a specific user? You can get the user id from the bot context, the user id will a UPN or Email, which you can assign within the deep link url when you interact with the Bot. Could you please clarify few points?

1. Are you willing to send the default message on 1:1 chat?

2. Is this for channel or group conversation?

@Trinetra-MSFT  Yes, I'm trying to send the default message on 1:1 chat not to channel or group conversation.
May be your can help me with getting users id from the bot context? As I understand I need to get users list for chose one of them?

@LiubovMurarova , Yes, you can get the user id from the Bot context please take a look at Get context for you Bot