从get course api中,我得到了一个上传的概览文件的链接。
fileurl: http:/{domain}moodlewebservicepluginfile.php50courseoverviewfilesimage1001.png。
当我试图从浏览器访问它时,我得到以下错误。
{"error": "A required parameter (token) was missing", "errorcode": "missingparam", "stacktrace":null, "debuginfo":null, "reproductionlink":null}。
Moodle版本: 3.8.2
我需要做什么?我需要在哪里传递令牌?这个token和Webservice用户token一样吗?
哎呀,我找到解决办法了。你需要在url中添加 "token",而不是 "wstoken",例如:http:/{domain}moodlewebservicepluginfile.php50courseoverviewfilesimage1001.png?token=USER_TOKEN。