You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
I am behind a corporate firewall, which means that my proxy needs login and password and here is how I did it (replace clientid, clientsecret, id, login, password and host with your values):
import os, ET_Client
login = "YOUR DATA GOES HERE"
password = "YOUR DATA GOES HERE"
proxy_host = "YOUR DATA GOES HERE"
clientid = "YOUR DATA GOES HERE"
clientsecret = "YOUR DATA GOES HERE"
authurl = "YOUR DATA GOES HERE"
proxy = f'http://{login}:{password}@{proxy_host}:8080'
os.environ['http_proxy'] = proxy
os.environ['HTTP_PROXY'] = proxy
os.environ['https_proxy'] = proxy
os.environ['HTTPS_PROXY'] = proxy
print("Trying to log in...")
stubObj = ET_Client.ET_Client(False, False,
params={'clientid': clientid,
"clientsecret":clientsecret,
"useOAuth2Authentication":"True",
"authenticationurl":authurl})
print("Login: DONE!")
proxy_settings = dict(http=proxy, https=proxy)
stubObj.soap_client.set_options(proxy=proxy_settings)
print('>>> Get all of the DataExtensions in an Account')
de = ET_Client.ET_DataExtension()
print('>>> Get all of the DataExtensions in an Account: DONE!')
de.auth_stub = stubObj
de.props = ["CustomerKey", "Name"]
print('>>> Fetching extensions\' data')
getResponse = de.get()
print(f'>>> Fetching extensions\' data: DONE!')
print(f'Retrieve Status: {getResponse.status}')
print(f'Code: {getResponse.code}')
print(f'Message: {getResponse.message}')
print(f'MoreResults: {getResponse.more_results}')
print(f'RequestID: {getResponse.request_id}')
print(f'Results Length: {len(getResponse.results)}')
Update: for the underlying soap client to use your proxy settings you need to specify them in the build_soap_client() method defined in FuelSDK/client.py at line 245. This is how I do it:
1)Add line
I'm trying to instanciate the ET_Client and get the 407 error... it's proxy authenticatio
How do I configure this class to read my proxies authentication?
The text was updated successfully, but these errors were encountered: