2014-03-19 20:20 GMT+01:00 Magnus Manske <[email protected]>: > Hi Brad, > > I'm sure that's correct, but: > > * When I just sign the OAuth params (no content type, no POST fields), I > get "The authorization headers in your request are not valid: Invalid > signature" > * When I then add the content-type to the header, I get ... the API help > page, wrapped in the XML tag <error code="help" info="" > xml:space="preserve"> (even though I am querying JSON...) > > Apologies if this gets too detailed for the mailing list, it's just very > frustrating :-(
Been there... and yes, it is painful! I had the same problem while building a python app using OAuth, I was myself receiving the "The authorization headers in your request are not valid: Invalid signature" error. Eventually I found that in my case the source for the error was the econding of title, since I was doing it (erroneously) two times, so that, for example: Teatro_comunale_(Bolzano) -> Teatro_comunale_%28Bolzano%29 ->Teatro_comunale_%2528Bolzano%2529 Strangely, the MediaWiki API instead of saying "missing page" it was giving me the invalid request header answer. I don't know if this is a real bug or simple it was something I should not be doing in the first place, so I did not report it. About multipart/form-data requests I have made a couple of pull requests to this (python) library by User:Valhallasw: flask-mwoauth. Here's the relevant code: https://github.com/CristianCantoro/flask-mwoauth/commit/ae00d023f9b720c45510213429c091813032835d HTH, Cristian _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
