Are you trying to get an access token within the Itch app or on the website? I don't think you can use the OAuth method in the app, and on the website you can't get a token for your HTML5 game directly, unless you redirect/open a new page to your OAuth URL and then redirect back to your game.