I use it to download datasets from the datahub into a database. I started from the examples from here:
https://community.brightspace.com/s/article/Brightspace-Data-Sets-Headless-Non-Interactive-Client-Example
Take a close look at the trade_in_refresh_token and get_with_auth functions.
It uses the Requests library from here:
https://requests.readthedocs.io/en/latest/
Thank you so much for sharing this information, Randall. The latest I heard from my colleague is this:
I used postman to get the token and then used the token in my python and I still get the forbidden message. I have another script that opens a browser programmatically and works but requires user interaction.
My supervisor thinks if it's actually an issue with the API configuration itself. I will post an update as soon as I hear more from him.
Thank you again.
@Randall.S.394 Thank you for sharing the KB article. I couldn't open the link you shared, but I searched on the website and found this link below; I am hoping it's the same one that you referred to. We were wondering if you could share your working scrip t ? (with no credential information listed). Only if you are able; if not, it's totally ok.
Sorry one more question from my colleague (supervisor):
I am curious where Randall got the refresh token that's in the config.json file.
We really appreciate all your help. I am also going to try and reach out to D2L tech support and see if I can get some assistance.
Thank you again for your time and help. Roopa
https://community.d2l.com/brightspace/kb/articles/1105-brightspace-data-sets-headless-non-interactive-client-example