If uipath you can directly use orchestrator http request instead you need not use http request
For python generally it will be the web app that you create to that it should redirect so it looks something like this
https://your-web-app.com/redirect
Or you need to use application scope for that if you dont have a redirect url
Basically when you request a code oauth 2.0 uses the redirect url to provide the code back to the requested site or application. So its like a url used to communicate back
Cheers