name-suggestion-index icon indicating copy to clipboard operation
name-suggestion-index copied to clipboard

Invalid crsf token when running Wikidata script

Open arch0345 opened this issue 1 year ago • 1 comments

When running npm run wikidata, it keeps giving me this error about an invalid crsf token: image I haven't changed my Wikibase password and can still access/modify Wikidata through the web interface

arch0345 avatar Jan 22 '24 19:01 arch0345

oh thats weird.. I will check if I get this too wikibase-edit can be updated to v6, maybe I should do that.

bhousel avatar Jan 22 '24 21:01 bhousel

wikibase-edit was updated to 7.0.3 in #9353. It hasn't fixed it, nor if we revert to 6.0.4 gives me "403 Forbidden".

This suggests we should be using OAuth, but NSI would have to apply for that.

Cj-Malone avatar Apr 12 '24 11:04 Cj-Malone

I was able to setup an OAuth key and used the template for using OAuth, but now I'm getting a different error:

image

Here's what my secrets file looks like:

{
"wikibase": {
      "oauth": {
        "consumer_key": "••••••••••",
        "consumer_secret": "••••••••••",
        "token": "••••••••••",
        "token_Secret": "••••••••••"
      }
    }
}

arch0345 avatar Apr 13 '24 00:04 arch0345

@arch0345 possible typo in "token_Secret": "••••••••••"? Template says it should be "token_secret".

panasonic-mafia avatar Apr 22 '24 10:04 panasonic-mafia

@arch0345 possible typo in "token_Secret": "••••••••••"? Template says it should be "token_secret".

:facepalm: Thanks for pointing this out, this seems to fix it!

arch0345 avatar Apr 22 '24 20:04 arch0345