How to take token for chat's conversation?

Thank for your quick answer.

Sure, I modified this code to take message in chatroom.

So, I tested 2 way.

I used token received via URL.
POST https://api.twitch.tv/kraken/oauth2/token?client_id={client_id}&client_secret={client_secret}&grant_type=client_credentials&scope=chat_login

It occured “Login authentication failed.”
like below .

But, When I used token received via Twitch Chat OAuth Password Generator. It worked normal.
like below

[Twitch Chat OAuth Password Generator : Twitch Chat Password Generator]

I want to know about my mistake.
Do failed for taking token? or other something?