Sounds like you applied for a Client Credentials
instead of a User Token
Did this return the user_id of your Bot in the response?
With grant_type=client_credentials or &response_type=code ?
The former won’t work for logging into Chat
Step one of “bot/user” oAuth involves redirecting the user to Twitch where they accept/decline the link between the Twitch account and your ClientID/Application