Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2364

Need help debugging REST call

$
0
0
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: 

Partial screenshot of Moodle administration showing the details of a single API token entry

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?


Viewing all articles
Browse latest Browse all 2364

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>