API:Assert
From MediaWiki.org
![]() |
This page is part of the MediaWiki API documentation. |
Language: | English • 日本語 |
---|
Quick overview:
- Quick start guide
- FAQ
- Tutorial
- Formats
- Error reporting
- Restricting usage
- Cross-site requests
- Authentication
- Queries
- Search suggestions
- Parsing wikitext and expanding templates
- Purging pages' caches
- Parameter information
- Changing wiki content
- Watchlist feed
- Wikidata
- Extensions
- Using the API in MediaWiki and extensions
- Miscellaneous
- Implementation
- Client code
- Asserting
MediaWiki version: | 1.23 |
To make sure your bot doesn't edit while logged out, the API provides an assert parameter which you can add to any request.
assert=user
: Checks that your account is logged inassert=bot
: Checks that your account has the 'bot' user right
If the assertion fails, error codes of assertuserfailed
or assertbotfailed
will be returned.