API returns my schools login page

Jump to solution
LoganDDiamond
Community Member

Hello, I am making a web app that groups all my assignments into one list and whenever I request data from the API it returns with my school's SSO login page, is there any way to combat this? I am pretty sure I'm using the correct auth attributes but I don't know, here is the current URL I am requesting from

 

https://[school].instructure.com//users/[userid]/courses?access_token=[mytoken]

 

i am aware that including my token in client-side code is not recommended but i am not sharing this with anyone and its hosted within my network behind a firewall.

Labels (1)
0 Likes
1 Solution
DecoyLex
Community Participant

Hi @LoganDDiamond,

The URL you posted isn't actually hitting the API at all. You need to add "/api/v1" after the "instructure.com" like so:

https://[school].instructure.com/api/v1/users/[userid]/courses?access_token=[yourtoken]

 I hope this helps!

View solution in original post

0 Likes