Ok, so I tried a couple of different java oauth libs, but could non of them get to work. Googles version fails cause twitch replies a space splitted “array” as one string where google awaits a “normal” json array, others miss either the last step where you actuall get the token after you got the auth token or fail to correctly set the client-id wich result in error returned. Interesstingly I also could only got googles lib work on google services like youtube - all the other libs failed the same as on twitch.
So, I ended up in doing it myself using javas urlconnection and simple regex parsing as the structure is fixed.
Only other option might be to fork the available libs and “correct” them to work with twitch - but that’s overkill just to get a token.
Topic can be closed.