API returns my schools login page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024
12:07 PM
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.
Solved! Go to Solution.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024
02:44 PM
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!