2

Objective is to use the Moodle web services to fetch information via Postman. In this case

  • Webservice function : core_enrol_get_enrolled_users
  • Already created a user that had the rights to access the content
  • wsToken used as a parameter

When sending the GET command in Postman, getting the below error

<?xml version="1.0" encoding="UTF-8" ?>
<EXCEPTION class="webservice_access_exception">
    <ERRORCODE>accessexception</ERRORCODE>
    <MESSAGE>Access control exception</MESSAGE>
</EXCEPTION>

What are the possible missing configuration for the above error ?

Shantanu Mitra
  • 31
  • 1
  • 1
  • 6

1 Answers1

1

Go to

http://www.yoursite.com/admin/settings.php?section=webservicesoverview

...where "www.yoursite.com" is the domain of your site.

and follow the steps. They are very helpful, usually.

Have you tried POSTing the request with the wstoken in the URL i.e. part of GET?

Pete
  • 1,289
  • 10
  • 18