1

I can send/reply to an existing chat thread, but can not send a message to someone whom does not have any established chats yet

I am using this POST API - https://graph.microsoft.com/beta/users/{ID}/chats/messages and getting this error { "error": { "code": "UnknownError", "message": "", "innerError": { "request-id": "72bb5b10-7268-4014-9e87-0f5f685d4184", "date": "2019-10-03T07:50:54" } } }

2 Answers2

1

Currently there are no API's to start a conversation in 1:1 scope. If you want to create a new chat thread in a team please take a look at Create chatMessage in a channel. Please let us know if you need any further assistance.

Gousia Begum
  • 2,076
  • 1
  • 5
  • 9
  • Thanks for your response. I have implemented the functionality - "initiate a new chat thread in teams". Now my requirement is to initiate a new chat thread in chat window, is there any work around for this ? – Ravi Choudhary Oct 04 '19 at 06:08
  • Initiating a chat in a personal chat window is currently not supported. You can try [deeplinking to a user's chat](https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/deep-links#generating-a-deep-link-to-a-chat) and send a message through chat. – Gousia Begum Oct 07 '19 at 07:03
  • 2
    @Gousia-MSFT, has there been any changes to this? Is there a beta API yet? – Mr Rogers Jul 14 '20 at 21:41
0

Update

Based on documentation you can now create new chats through the Graph API https://learn.microsoft.com/en-us/graph/api/chat-post?view=graph-rest-1.0&tabs=http

You can also test it out in the Graph Explorer https://developer.microsoft.com/en-us/graph/graph-explorer

Luv2Learn
  • 130
  • 1
  • 1
  • 9