Couldn't connect to Twitch with the same settings I used yesterday

Tried to connect to Twitch via TwitchLib on Unity. Worked perfectly fine yesterday. Today, it threw up an exception.

BadRequestException: Your request failed because either:

  1. Your ClientID was invalid/not set.
  2. You requested a username when the server was expecting a user ID.

I tried regenerating my Client Secret and oAuth token, but to the same result.

Fixed it myself, or it started working again. Was using Client Secret, which had been working up until today. Changed to Client ID and it’s all fine now.

Thank you for your solution! I had the same problem, appreciate the help!