I just after posting this message tried doing IRCv3 capability negotiation, and saw that I now got a response when using CAP REQ, instead of invalid command. But I couldn’t find out what request to use.
I will look into this and probably join #twitch-api tomorrow.