I'm writing a migration script in an external website which has to download the courses from Moodle (using the URL above) and import them into the external website.
The URL is obviously authenticated - https://xxx.org/blocks/configurable_reports/viewreport.php?id=xxx&courseid=xxx&download=1&format=json
2 different authentication methods enabled on the modle site.
- Manual authentication (passing username, password, logintoken)
- Google SSO
Are there any APIs from Moodle which I can use directly in my external website to authenticate, authorize and download the courses - https://xxx.org/blocks/configurable_reports/viewreport.php?id=xxx&courseid=xxx&download=1&format=json?
Any help or references are much appreciated.
Thanks.!