The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December. Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
I am trying to develop a C# program that will post files as student assignment submissions into Canvas via Canvas API.
Details:
{
{"name", "sampleFile.pdf"},
{"size", fileInfo.Length.ToString()},
{"content_type", "application/pdf"}
};
httpWebRequest.Host = CanvasHost;
httpWebRequest.ContentType = "application/x-www-form-urlencoded";
httpWebRequest.Accept = "application/json";
httpWebRequest.ContentLength = byteArray.Length;
Any suggestions?
Doug
Solved! Go to Solution.
I'm assuming that you're trying to post assignments on behalf of another user. If so, you should read the masquerading docs.
I'm assuming that you're trying to post assignments on behalf of another user. If so, you should read the masquerading docs.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in