FuelSDK-Python icon indicating copy to clipboard operation
FuelSDK-Python copied to clipboard

Can't log in with username / password

Open filipealc opened this issue 8 years ago • 0 comments

So, the problem is that with C# I could solve this issue with the following code:


private SoapClient CreateETFrameworkBinding(string endpointAddress, string username, string password)
{
	// Create the binding
	BasicHttpBinding binding = new BasicHttpBinding();
	binding.Name = "SoapBinding";
	binding.Security.Mode = BasicHttpSecurityMode.TransportWithMessageCredential;
	binding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
	binding.ReceiveTimeout = new TimeSpan(0, 10, 0);
	binding.OpenTimeout = new TimeSpan(0, 10, 0);
	binding.CloseTimeout = new TimeSpan(0, 10, 0);
	binding.SendTimeout = new TimeSpan(0, 10, 0);
	binding.MaxBufferSize = 2147483647;
	binding.MaxBufferPoolSize = 524288;
	binding.MaxReceivedMessageSize = 2147483647;

	// Set the transport security to UsernameOverTransport for Plaintext usernames
	var endpoint = new EndpointAddress(endpointAddress);

	// Create the SOAP Client (and pass in the endpoint and the binding)
	SoapClient etFramework = new SoapClient(binding, endpoint);

	// Set the username and password
	etFramework.ClientCredentials.UserName.UserName = username;
	etFramework.ClientCredentials.UserName.Password = password;

	return etFramework;
}

Now I'm trying to migrate to python the code, but so far I think that maybe I'm too dumb to really work with SOAP on python, so, here I'm trying to make this work with the Fuel Sdk. I look at the java repository and found that there's an option to use the username / password authentication rather than client ID / client Secret but in the python repository I just couln't figure it out how to connect with exacttarget.

Any lights?

filipealc avatar Jul 26 '17 20:07 filipealc