Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Can't log in with username / password #78

Open
filipealc opened this issue Jul 26, 2017 · 0 comments
Open

Can't log in with username / password #78

filipealc opened this issue Jul 26, 2017 · 0 comments

Comments

@filipealc
Copy link

filipealc commented Jul 26, 2017

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant