The action API distinguishes between anonymous and registered users in a number of ways. We need to decide how to update these, given that temporary users will be considered a separate user type compared to anonymous and registered users (see also the discussion in {T337103}).
* [x] Some modules flag or filter by anon users. Should there be a separate flag/filter for temporary users? Should we use user experience flags/filters instead? Examples:
** [x] ApiQueryContributors returns `anons` count
** [x] ApiFeedRecentChanges accepts `hideanons` param - T358249
** [x] T351636: APIs that return `anon` flag:
* ApiQueryImageInfo
* ApiQueryLogEvents
* ApiQueryRecentChanges
* anything that extends ApiQueryRevisionsBase
[x] IP address blocks can be made against anonymous users only. How to update this will be worked out in {T338836}.
* ApiBlockInfoTrait returns `blockanononly` flag
* ApiQueryBlocks and ApiBlock accept `anononly` param
// These flags were documented as part of {T343714}. We're unlikely to rename them, since it would be a large breaking change. If we were to rename them, it would be beyond the scope of this task.//
[x] T351632: ApiMain accepts `assert` param to define allowed callers (`anon`, `user`, or `bot`)
[x] All action APIs can die with error code `notloggedin`. We could add an error code for temporary users who must register.
//Will be covered in {T339874}, so no more to do in this task.//
[x] T350701: Action and REST APIs can specify allowed user types for a parameter, via `UserDef::PARAM_ALLOWED_USER_TYPES`. We should add a temp user type to this list:
```lang=php
UserDef::PARAM_ALLOWED_USER_TYPES
'name': User names are allowed.
'ip': IP ("anon") usernames are allowed.
'cidr': IP ranges are allowed.
'interwiki': Interwiki usernames are allowed.
'id': Allow specifying user IDs, formatted like "#123".
```