1

I am trying to find the FromAddress associated with particular send jobs using the FuelSDK package in Python. After scouring through the documentation and source code, it doesn't appear to be anywhere.

Could someone please point me in the right direction?

Edit: Here's the sample piece of code I'm running, which is resulting in an empty response.results list:

import FuelSDK

clientid = "CLIENT ID GOES HERE"

clientsecret = "CLIENT SECRET GOES HERE"

stubObj = FuelSDK.ET_Client(params={'clientid':clientid,'clientsecret':clientsecret})

et_send = FuelSDK.ET_Send()

et_send.auth_stub = stubObj

response = et_send.get()

print(response.results[0]['FromAddress'])

0

I see FromAddress coming through in the following code:

import FuelSDK
import config # I defined my ET connection credentials in a separate module

myClient = FuelSDK.ET_Client(params=config.settings_production)

et_send = FuelSDK.ET_Send()
et_send.auth_stub = myClient

et_send.search_filter = {'Property': 'ID', 'SimpleOperator': 'equals', 'Value': YOUR_SEND_ID}
response = et_send.get()

print(response.results[0]['FromAddress'])
| improve this answer | |
  • Sorry, this still isn't working for me. What version of FuelSDK are you using? Mine doesn't have an ET_Send method (version 0.9.3) And I just downloaded config (version 0.3.9), but that doesn't have a settings_production method either. Am I missing something? – Andrew Jun 14 '16 at 15:25
  • I'm using my fork of 1.0.0. github.com/nxorable/FuelSDK-Python/tree/v1.0.0 Sorry for the confusion: config is a local module I used to store my ET connection credentials. – Brian Bien Jun 14 '16 at 15:34
  • I tried running this, but response.results comes out as an empty list. I'm not getting any actual error messages, just an empty results list. Do you have any insight into why this is happening? I've tried with and without a search_filter. – Andrew Jun 14 '16 at 18:24
  • What about these other response properties: status, code, message? – Brian Bien Jun 14 '16 at 18:40
  • I get the following for those: status = True ; code = 200 ; message = 'OK' – Andrew Jun 14 '16 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.