1

I am trying to run a basic Python script to search for a subscriber but it is failing to authenticate.

I've set up Python (successfully ran a Hello World script), installed FuelSDK, created a server-to-server app at SFMC App Center to retrieve my ClientID and ClientSecret. I've modified config.python to hold my ClientID and ClientSecret and changed file location of wsdl_file_local_loc to ExactTargetWSDL.xml.

I get the following error when I try to run the script:

Traceback (most recent call last):
  File "search_subscriber.py", line 3, in <module>
    myClient = ET_Client.ET_Client()
  File "C:\Python27\lib\site-packages\FuelSDK\client.py", line 115, in __init__
    self.refresh_token()
  File "C:\Python27\lib\site-packages\FuelSDK\client.py", line 192, in refresh_token
    raise Exception('Unable to validate App Keys(ClientID/ClientSecret) provided: ' + repr(r.json()))
Exception: Unable to validate App Keys(ClientID/ClientSecret) provided: {u'errorcode': 10005, u'message': u'clientId is required', u'documentation': u''}`

I'm not a programmer and I tried reading other answers with similar questions but I don't really know if they are applicable solutions to my problem. As far as I can tell, I copied and pasted the ID and Secret and there appears to be no typos.

Any help is appreciated, thanks.

2

In v0.9.4, lines 22 and 23:

client_id = None client_secret = None

Putting my credentials in there is the only change I made and it works just fine for me. You're entering them "as_strings", yeah?

Did you install through pip? There's a few dependencies it'd install for you like suds and requests if you're new to Python and didn't have them already - feels like you have some already if you're getting responses but just want to be sure.

  • modifying config.python did not work but modifying client.py as you suggested works. Thank you! – Minh D Dec 10 '15 at 12:08
  • Hi! Thanks for this been struggling with this for a minutes. I have added my credenttials here and it still isnt working. – Samuel Dare Jul 12 '17 at 12:14
  • 1
    IT workeD!!! I had already liked this ages ago but not tried it. All I had to do was refresh Jupyter – Samuel Dare Jul 12 '17 at 12:16

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.