Logging into chat is done by using an oauth token with the chat_login scope. Oauth tokens are given to applications, when a user authorizes the application to communicate with Twitch on their behalf, limited by the scopes used in the auth process.
So you need an application to get the chat login token. If you want to do more with the API than just chat, you’ll also need a client ID to use the HTTP API.