MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/API
action=login (lg)
(main | login)
- This module only accepts POST requests.
- Source: MediaWiki
- License: GPL-2.0+
Log in and get authentication cookies.
This action should only be used in combination with Special:BotPasswords; use for main-account login is deprecated and may fail without warning. To safely log in to the main account, use action=clientlogin.
Parameters:
- lgname
Nom d'usuari.
- lgpassword
Contrasenya.
- lgdomain
Domain (optional).
- lgtoken
A "login" token retrieved from action=query&meta=tokens
Examples:
- Retrieve a login token.
- api.php?action=login&lgname=user&lgpassword=password [open in sandbox]
- Inicia sessió.
- api.php?action=login&lgname=user&lgpassword=password&lgtoken=123ABC [open in sandbox]