Twitch provides the OAuth2 server. I presume since your class is centered on how to use an API that you are only going to consume it as a client. But yes, if you want to have others come over and authenticate, you need to setup some sort of service that they can choose to authorize with Twitch or not and then capture their token.
For a good example on how to get your token, follow:
Twitch provides examples using Curl to show you how to get your access token back. You can actually put the id.twitch.tv URL in your browser and once you verify your account and accept the permissions you will be redirected to the URL as indicated in that example and you can copy/paste the token from the address bar of your browser.
Hope that helps and good luck!