Ayuda de la API de MediaWiki
Esta es una página de documentación autogenerada de la API de MediaWiki.
Documentación y ejemplos: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=createaccount (create)
- Este módulo requiere permisos de escritura.
- Este módulo solo acepta solicitudes POST.
- Fuente: MediaWiki
- Licencia: GPL-2.0-or-later
Crear una nueva cuenta de usuario.
The general procedure to use this module is:
- Fetch the fields available from action=query&meta=authmanagerinfo with amirequestsfor=create, and a createaccount token from action=query&meta=tokens.
- Present the fields to the user, and obtain their submission.
- Post to this module, supplying createreturnurl and any relevant fields.
- Check the status in the response.
- If you received PASS or FAIL, you're done. The operation either succeeded or it didn't.
- If you received UI, present the new fields to the user and obtain their submission. Then post to this module with createcontinue and the relevant fields set, and repeat step 4.
- If you received REDIRECT, direct the user to the redirecttarget and wait for the return to createreturnurl. Then post to this module with createcontinue and any fields passed to the return URL, and repeat step 4.
- If you received RESTART, that means the authentication worked but we don't have a linked user account. You might treat this as UI or as FAIL.
- createrequests
Only use these authentication requests, by the id returned from action=query&meta=authmanagerinfo with amirequestsfor=create or from a previous response from this module.
- Separar los valores con | o con una alternativa.
- Maximum number of values is 50 (500 for clients that are allowed higher limits).
- createmessageformat
Formato utilizado para los mensajes devueltos.
- Uno de los siguientes valores: html, none, raw, wikitext
- Predeterminado: wikitext
- createmergerequestfields
Combinar la información de los campos para todas las peticiones de autentificación en una matriz.
- Type: boolean (details)
- createpreservestate
Preservar el estado de un intento fallido anterior de inicio de sesión, si es posible.
Si action=query&meta=authmanagerinfo devolvió true (verdadero) para hasprimarypreservedstate, deberían omitirse las peticiones marcadas como primary-required. Si devolvió un valor no vacío para preservedusername, se debe usar ese nombre de usuario en el parámetro username.
- Type: boolean (details)
- createreturnurl
Return URL for third-party authentication flows, must be absolute. Either this or createcontinue is required.
Upon receiving a REDIRECT response, you will typically open a browser or web view to the specified redirecttarget URL for a third-party authentication flow. When that completes, the third party will send the browser or web view to this URL. You should extract any query or POST parameters from the URL and pass them as a createcontinue request to this API module.
- createcontinue
This request is a continuation after an earlier UI or REDIRECT response. Either this or createreturnurl is required.
- Type: boolean (details)
- createtoken
A "createaccount" token retrieved from action=query&meta=tokens
- Este parámetro es obligatorio.
- *
- This module accepts additional parameters depending on the available authentication requests. Use action=query&meta=authmanagerinfo with amirequestsfor=create (or a previous response from this module, if applicable) to determine the requests available and the fields that they use.
- Empezar el proceso de creación del usuario Example con la contraseña ExamplePassword.
- api.php?action=createaccount&username=Example&password=ExamplePassword&retype=ExamplePassword&createreturnurl=http://example.org/&createtoken=123ABC [abrir en la zona de pruebas]