【发布时间】:2018-08-02 08:47:10
【问题描述】:
我已经在本地主机上配置了moodle,我正在尝试生成用于身份验证的令牌。
我已经按照以下步骤操作了:
== 配置 Moodle 以使用该应用程序 ==
管理 -> 插件 -> Web 服务 -> 外部服务 -> 启用移动 Web 服务
管理 -> 插件 -> Web 服务 -> 协议 -> 启用 REST
管理 -> 用户 -> 权限 -> 定义角色 -> 编辑经过身份验证的用户角色 -> 允许 webservice/rest:use
管理 -> 安全 -> 站点策略 -> 更改服务器上传限制。它不能是服务器限制。有一个bug in Moodle Web Services
网址:-http://localhost/moodle/login/token.php?username=admin&password=Turbo@000&service=local_mobile
Response :-
{
"error": "Web service is not available (it doesn't exist or might be disabled)",
"stacktrace": null,
"debuginfo": null,
"reproductionlink": null
}
【问题讨论】:
标签: php moodle moodle-api moodle-mobile