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

For curl it’s -X not -x (upper case X) to declare the method for the request.