The code in the querystring is not an OAuth token. Your server needs to complete the Authorization Code flow by exchanging that code for an Access Token and Refresh Token.
Step 3 of the Auth Code Flow docs show what you need to do. Getting Tokens: OAuth | Twitch Developers