为什么 Exact Target FUEL SDK 没有验证我的 API 密钥?

why is Exact Target FUEL SDK not validating my API keys?

我正在使用 FUEL SDK for Exact Target API。我已经设置了我的环境变量,但该应用程序一直拒绝我的数据,并抛出以下错误消息

    raise Exception('Unable to validate App Keys(ClientID/ClientSecret) provided: ' + repr(r.json()))
Exception: Unable to validate App Keys(ClientID/ClientSecret) provided: {u'errorcode': 1, u'message': u'Unauthorized', u'documentation': u''}

我正在查看客户端,但不明白为什么身份验证会停止。这是我的代码:

import os

os.environ["FUELSDK_CLIENT_ID"] = ""
os.environ["FUELSDK_CLIENT_SECRET"] = ""
os.environ["FUELSDK_DEFAULT_WSDL"] = "https://webservice.exacttarget.com/etframework.wsdl"
os.environ
["FUELSDK_AUTH_URL"] = "https://auth.exacttargetapis.com/v1/requestToken?legacy=1"
#os.environ["FUELSDK_WSDL_FILE_LOCAL_LOC"] = "C:\Users\Aditya.Sharma\AppData\Local\Temp\ExactTargetWSDL.s6.xml"


# Add a require statement to reference the Fuel SDK's functionality:
import FuelSDK

# Next, create an instance of the ET_Client class:
myClient = FuelSDK.ET_Client()

# Create an instance of the object type we want to work with:
list = FuelSDK.ET_List()

# Associate the ET_Client to the object using the auth_stub property:
list.auth_stub = myClient

# Utilize one of the ET_List methods:
response = list.get()

# Print out the results for viewing
print 'Post Status: ' + str(response.status)
print 'Code: ' + str(response.code)
print 'Message: ' + str(response.message)
print 'Result Count: ' + str(len(response.results))
print 'Results: ' + str(response.results)

有人可以告诉我为什么我被拒之门外吗?

这是我正在使用的 git 存储库:https://github.com/salesforce-marketingcloud/FuelSDK-Python

提前谢谢你。

在 client.py

中更新客户端 KEY/PWD