How do I get Authorization code?

i reviewed it but what I’m having issue is described below
authorize_url = “https://api.twitch.tv/kraken/oauth2/authorize
client_id = “Something”
RESPONSE_TYPE=code
SCOPE = “analytics:read:games”
COMPLETE_URL = authorize_url+“?client_id=”+client_id+“&redirect_uri=”+callback_uri+“&response_type=”+RESPONSE_TYPE+“&scope=”+SCOPE
print(COMPLETE_URL)
r = requests.head(url=COMPLETE_URL,allow_redirects=True)
print(r.url)

Output recieved:

But the output expected should be
http://localhost/?code=Some CODE l&scope=analytics%3Aread%3Agames