[ARCHIVED] Sending message to a student using Conversations API

manuelgarciaph
Community Participant

We have integrated a ticketing system within Canvas using LTI tool. The next step for us is to integrate its notification within Canvas conversations.

However, unlike other endpoints, the Conversations API is a little bit harder to understand. I've been reading several questions in the forum but couldn't find similar issue with me.

The error says: "conversation_ids not specified". However, the "Create a Conversation" endpoint does not say anything about conversation_ids. Hence, I assume that there is an error in the data I'm sending. Unfortunately, I couldn't put the pieces together by just reading the documentation.

Here is the source code we have been testing:

 

require "class.curl.php";
$cURL = new Curl($TOKEN, $SITE);

$MESSAGE = array(
   "force_new" => true,
   "body" => "hehehe",
   "subject" => "Action Taken to Ticket",
   "context_code" => "course_56492",
   "recipients[]" => "48904"
);

$cURL->put("/conversations", $MESSAGE);

 

 Thank you in advance!

Labels (2)
0 Likes
Users who also had this question