by Joel Peltonen.
Moodle Version 4.5.4+ (Build: 20250417). I'm trying to automatically enroll teachers and students based on an external system. I'm stuck in my very first experiment;
curl "https://my-production-domain/webservice/rest/server.php?moodlewsrestformat=json&wstoken=foo&wsfunction=core_webservice_get_site_info"
This produces
{
exception: "webservice_access_exception",
errorcode: "accessexception",
message: "Access control exception",
}
And I can't figure out why. I only have only one token:
This token is mapped to user DCI Web Services who is a site administrator. The service DCI Custom Test API is enabled, it has the DCI Web Services user in authorized users, and it has core_webservice_get_site_info in its list of functions, amongst others.
What I am missing?