Luk*_* G. 5 rest web-services moodle
遵循各种指南,我设法完成了以下工作:
现在,当我转到内置 Web 服务测试客户端时,选择在 REST API 上使用基于令牌的身份验证,选择“moodle_user_create_users”函数并输入令牌和详细信息,我得到以下信息:
REST protocol: moodle_user_create_users
URL: [...]
'<?xml version="1.0" encoding="UTF-8" ?>
<EXCEPTION class="webservice_access_exception">
<ERRORCODE>accessexception</ERRORCODE>
<MESSAGE>Access control exception</MESSAGE>
<DEBUGINFO>Access to the function moodle_user_create_users() is not allowed.
There could be multiple reasons for this:
1. The service linked to the user token does not contain the function.
2. The service is user-restricted and the user is not listed.
3. The service is IP-restricted and the user IP is not listed.
4. The service is time-restricted and the time has expired.
5. The token is time-restricted and the time has expired.
6. The service requires a specific capability which the user does not have.
7. The function is called with username/password (no user token is sent)
and none of the services has the function to allow the user.
These settings can be found in Administration > Site administration
> Plugins > Web services > External services and Manage tokens.</DEBUGINFO>
</EXCEPTION>
Run Code Online (Sandbox Code Playgroud)
我错过了什么?
我的答案似乎与其他人经历过的一样:Web 服务测试客户端已彻底损坏。
这是我从事该项目时的一个已知问题,不幸的是,Moodle 决定继续提供此功能。
在可预见的未来,我建议不要浪费时间尝试使用这个“工具”。
| 归档时间: |
|
| 查看次数: |
7721 次 |
| 最近记录: |