Showing results for 
Search instead for 
Did you mean: 
Community Member

Access an assignment without the login prompt

My app needs to be able to view an assignment page - I request it like so by querying the html_url field of the assignment object:

GET /courses/<course id>/assignments/<assignment id> HTTP/1.1

Authorization: Bearer 7~wWREGjPjZnw...

But instead of getting the assignment I get redirected to the login page, after which it goes to the assignment.  Does the API ignore the auth token when getting assignments?

0 Kudos
2 Replies
Community Champion

Hi @ppoirier --

It looks like you're requesting the webapp URL rather than the API URL. You'd want to use this instead:

GET /api/v1/courses/<course_id>/assignments/<assignment_id>

(and include the Authorization header as you have it). 

Hope this helps!


Community Member

Thanks @ColinMurtaugh!  I actually need the HTML web page of the assignment, not the object.  But it turns out I can use the description field.  I was thinking that I wouldn't be able to get any html resources (images, etc.) but they're all qualified with verifier=LIXUAU... so it works.

Best regards,