core_course_get_categories API Access

core_course_get_categories API Access

by Jerry Fan -
Number of replies: 0

I'm attempting to use GET requests to get all the course categories in my moodle server, however I am getting this error with the following GET request:

/webservice/rest/server.php?wstoken=***&wsfunction=core_course_get_categories

<EXCEPTION class="webservice_access_exception">

   <ERRORCODE>accessexception</ERRORCODE>

   <MESSAGE>Access control exception</MESSAGE>

</EXCEPTION>


The request is successful however when I try to list all the courses using the request below.

/webservice/rest/server.php?wstoken=***&wsfunction=core_course_get_courses


Anyone see what I'm doing wrong?

Average of ratings: -