MediaWiki API 帮助

这是自动生成的MediaWiki API文档页面。

文档和例子:-{R|https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page}-

action=centralauthtoken

main | centralauthtoken
  • 此模块需要读取权限。
  • 来源:CentralAuth
  • 许可协议:GPL-2.0-or-later

取得centralauthtoken用于已认证的一个附加到wiki的请求。

Returns a token that can be use to authenticate API requests on other wikis. For action API requests, put it in the centralauthtoken GET parameter. For REST API requests, add an Authorization: CentralAuthToken {token} header. In MediaWiki frontend logic, you can use the mediawiki.ForeignApi ResourceLoader module.

例子:
取得一个centralauthtoken
api.php?action=centralauthtoken [在沙盒中打开]