API returning an invalid access token?

Had to use PHP and switch response type to code in order for it to work. So there is definitely something wrong with token as a response type and I would greatly appreciate it if Twitch can look into this for me. I like to avoid PHP as much as I can.