That is of course what I do, full api query is meta=tokens&type=watch|rollback
I do receive a rollback token, but it works only sometimes. It randomly gets invalid. On Thu, Nov 6, 2014 at 2:25 PM, [email protected] <[email protected]> wrote: > For rollback you need a rollback token (if i'm right), with > api.php?action=query&meta=tokens you get a csrf token (like the api page > says). What is, if you use api.php?action=query&meta=tokens&type=rollback to > retrieve a token? > > Freundliche Grüße / Kind regards > Florian Schmidt > > -----Original-Nachricht----- > Betreff: [Wikitech-l] How does new revert token system works? > Datum: Thu, 06 Nov 2014 14:00:26 +0100 > Von: Petr Bena <[email protected]> > An: Wikimedia developers <[email protected]> > > Hey, > > I've seen a lot of changes in token system, however how it works is a > mystery to me. So far I understood it as: > > You no longer get revert token per each edit using intoken but get > some kind of global rollback token using action=query&meta=tokens > > Is this how it should work? If yes, there is a bug in mediawiki, > because token returned by this api is randomly invalid. That means, > sometimes it can be used and sometimes it return badtoken, which can > be fixed only by either logging out and back in, or using the > deprecated intoken parameter which returns working token (but is > deprecated). > > If this is not how it should work, can someone explain to me how it > works? Thanks > > here are some logs (read from bottom to top): > > Thu Nov 6 13:57:57 2014 DEBUG[1]: Failed to deliver message to 122.176.67.4 > Thu Nov 6 13:57:57 2014 Did not revert Tourism in Jammu and Kashmir: > ERROR: Cannot rollback, token > 0c59203d7b4d176f28540646c82e264a545b7039+\ is not valid for some > reason (mediawiki bug), please try it once more > Thu Nov 6 13:57:57 2014 DEBUG[1]: Query failed: badtoken details: See > https://en.wikipedia.org/w/api.php for API usage > Thu Nov 6 13:57:57 2014 DEBUG[1]: Rolling back Tourism in Jammu and Kashmir > Thu Nov 6 13:57:57 2014 WARNING: API query (info): The intoken > parameter has been deprecated. > Thu Nov 6 13:57:57 2014 DEBUG[1]: Sending message to user 122.176.67.4 > Thu Nov 6 13:57:29 2014 DEBUG[1]: enwiki mediawiki 1.25wmf6 > Thu Nov 6 13:57:29 2014 DEBUG[2]: Token for enwiki rollback > 0c59203d7b4d176f28540646c82e264a545b7039+\ > > _______________________________________________ > Wikitech-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/wikitech-l > > > > _______________________________________________ > Wikitech-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
