Use the authorization code to get a token: Could not resolve proxy

This suggests your code/server is configured to use a proxy.

And that proxy is not working.

So it’s your system configuration at play.