1

I'm trying to consume Moodle web services but they respond accessexception. I already generated the Token and enabled the web services from the Moodle administration module.

my endpoint

http://MyMoodle/moodle/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_group_get_course_user_groups&wstoken={my_token}

is returning the following exception:

{
    "exception": "webservice_access_exception",
    "errorcode": "accessexception",
    "message": "Excepción al control de acceso"
}
Richard Stoeffel
  • 695
  • 8
  • 13
  • Welcome to SO, You should share the specific code that is causing this error to be called, not a link to your model, if you want assistance – Richard Stoeffel May 28 '19 at 17:29
  • Hi - Here's a great checklist of possible causes: https://docs.moodle.org/22/en/Web_services_FAQ#What_is_the_.27Access_control_exception.27_error . One area to check out: even if web services are enabled and the token is generated, the user must be permitted to call certain functions. Hope this is helpful! – John May 30 '19 at 03:19

0 Answers0