We are a software developement company with a module concerning Moodle. One of the first steps this module takes is to connect a retrieve a token from our customer’s Moodle database via a webservice. However, with no apparent reason, for one of our customers (and JUST for that customer, all other customers using the module have reported no problem at all) the process is returning a 403 Forbidden error.
These are the facts I can provide:
- Moodle’s version is 3.11, in a test server the customer has provided so we can test the problem (their main server is 3.9)
- Webservices are enabled.
- The webservice is correctly created, it has a short name and the necessary functions.
- The REST protocol is currently enabled.
- The user we’ve enable the webservice for (the main admin) has the necessary permissions (moodle/webservice:createtoken and webservice/rest:use)
- A token has been created for that webservice/user pairing. The token has no set expiration date.
- The internal testing for functions to test the webservice fails, also returning an access exception error (we tested the core_fetch_notifications and core_webservice_get_site_info functions. We’ve checked the core_fetch_notifications is currently enabled for our webservice):
<?xml version="1.0" encoding="UTF-8" ?>
<EXCEPTION class="webservice_access_exception">
<ERRORCODE>accessexception</ERRORCODE>
<MESSAGE>Excepción al control de acceso</MESSAGE>
</EXCEPTION>
We’re lost as to what to test next or how to solve this problem. Has anybody found a similar problem? If so, can you please tell us what can we test next to fund the issue?
Thanks in advance. Best regards
Kherian Soft is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.