Is there a way to update redirect parameters

Jump to solution
tjones1
Community Novice

Our custom lti external tool allows an instructor to choose the original redirect url with a visual interface.

Is there a way to update the redirect url using another POST from within the tool?

I don't want to do it manually.

lti_update_manually.png

Labels (1)
1 Solution
tjones1
Community Novice
Author

After finding that I needed to change the assignment, I figured out how to Edit an Assignment using the API.

Canvas LMS REST API Documentation

Kenneth Larsen helped me with my other question.

https://community.canvaslms.com/thread/2681?q=how%20to

To update the redirect url of an assignment created using an External Tool after the original resource selection.

I needed to PUT using curl.

$data = "assignment[external_tool_tag_attributes][url] = newURL";

     $ch = curl_init();

     curl_setopt_array($ch, array(

            CURLOPT_URL => $canvasapi."?access_token=".$atoken,

            CURLOPT_CUSTOMREQUEST => "PUT",

            CURLOPT_POSTFIELDS => $data,

            CURLOPT_RETURNTRANSFER => true,

     ));

     $result = curl_exec($ch);

     curl_close($ch);

View solution in original post