Jump to content

Topic on Project:Support desk

API blockinfo query for IP editors returns "invalid"

4
Tigraan (talkcontribs)

The exact query I stumbled on is but the example from API:Users is similar.

Behavior I expected: query returns the block information for the user (block date, reason, expiry time etc.) if user is currently blocked. (12.54.29.3 is blocked on en-wp.) This is what happens with a logged-in user (see e.g. https://en.wikipedia.org/w/api.php?action=query&list=users&ususers=Dananadan&usprop=blockinfo).

Real behavior: The query returns an "invalid" field and does not display the block info.

EDIT : example output

{ "batchcomplete": "", "query": { "users": [ { "name": "12.54.29.3", "invalid": "" } ] } }

Is this normal/desired? If so, how can one recover the block info for an IP editor on en-wp?

Tigraan (talkcontribs)
Ciencia Al Poder (talkcontribs)

It works for me. Maybe if the user doing the request is blocked, it doesn't have permissions to display the block information? (which I find weird)

Jtmorgan (talkcontribs)