Zorglub27 added a comment.

ok, so I came to solve all my problems, including the very nasty

  '{"servedby":"mw1200","error":{"code":"badtoken","info":"Invalid 
token","*":"See https://www.wikidata.org/w/api.php for API usage"}}' }

which wasn't a problem from the token but in fact from the cookies: I was just 
using the last cookies while a composition of 2 of 'set-cookie' responses from 
the 3 steps of this authentification madness where required. At this point you 
might spit on both my development skills and javascript libs cookie management 
but there are at least 2 things to learn from my lost 12 hours:

- the documentation and the API error messages are incomplete, cf the 
parameters that should be passed in the body and not in the query, and the body 
that had to be x-www-form-urlencoded and not json
- one day everything will be json and API keys instead of cookies, and that 
will be good... until the next generation of developers comes with a new shiny 
thing ;)

thank you Adam for your help!


TASK DETAIL
  https://phabricator.wikimedia.org/T109175

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Addshore, Zorglub27
Cc: Addshore, Zorglub27, Aklapper, Wikidata-bugs, aude, jayvdb, Anomie, 
Legoktm, Malyacko



_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to