The above error message appears if i use the MW 1.27 API. The documentations says the change was >=1.27 but the above code worke with 1.27 and does not with 1.31.
I find the description in the order of steps confusing. The example code does not fit the description any more.
The descriptions seems to ask for getting the createtoken first then using it for the the authmanagerinfo call. In the API sandbox it works without the token see https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&meta=authmanagerinfo&amirequestsfor=create
Now I get a json result like this:
{
"batchcomplete": "",
"query": {
"authmanagerinfo": {
"canauthenticatenow": "",
"cancreateaccounts": "",
"preservedusername": "",
"requests": [{
"id": "MediaWiki\\Auth\\TemporaryPasswordAuthenticationRequest",
"metadata": {},
"required": "primary-required",
"provider": "Temporary password",
"account": "",
"fields": {
"mailpassword": {
"type": "checkbox",
"label": "Use a temporary random password and send it to the specified email address",
"help": "Can be used to create account for another person without learning the password."
}
}
}, {
"id": "MediaWiki\\Auth\\PasswordAuthenticationRequest",
"metadata": {},
"required": "primary-required",
"provider": "Password-based authentication",
"account": "",
"fields": {
"username": {
"type": "string",
"label": "Username",
"help": "Username for authentication."
},
"password": {
"type": "password",
"label": "Password",
"help": "Password for authentication.",
"sensitive": ""
},
"retype": {
"type": "password",
"label": "Retype password:",
"help": "Password again to confirm.",
"sensitive": ""
}
}
}, {
"id": "MediaWiki\\Auth\\UsernameAuthenticationRequest",
"metadata": {},
"required": "required",
"provider": "MediaWiki\\Auth\\UsernameAuthenticationRequest",
"account": "MediaWiki\\Auth\\UsernameAuthenticationRequest",
"fields": {
"username": {
"type": "string",
"label": "Username",
"help": "Username for authentication."
}
}
}, {
"id": "MediaWiki\\Auth\\UserDataAuthenticationRequest",
"metadata": {},
"required": "required",
"provider": "MediaWiki\\Auth\\UserDataAuthenticationRequest",
"account": "MediaWiki\\Auth\\UserDataAuthenticationRequest",
"fields": {
"email": {
"type": "string",
"label": "Email",
"help": "Email address",
"optional": ""
},
"realname": {
"type": "string",
"label": "Real name",
"help": "Real name of the user",
"optional": ""
}
}
}, {
"id": "MediaWiki\\Auth\\CreationReasonAuthenticationRequest",
"metadata": {},
"required": "optional",
"provider": "MediaWiki\\Auth\\CreationReasonAuthenticationRequest",
"account": "MediaWiki\\Auth\\CreationReasonAuthenticationRequest",
"fields": {
"reason": {
"type": "string",
"label": "Reason",
"help": "Message shown in the account creation log"
}
}
}]
}
}
}
What is it good for? How is it used? What is the structure/motivation? Where is an example of using this information?