If you are wanting to get permission from another user, then you will need setup a web page that you register as a callback with Twitch (especially for user facing items). If you are just playing around through your own account, then you can point Twitch to localhost and you will need to setup a webpage that handles the requests back from Twitch.
That is all fairly well documented here:
There are examples using curl from the command line to do what you want.