0

我正在使用適用於精確目標API的FUEL SDK。我安裝我的enviorment變量,但應用程序不斷否認我的數據,並拋出以下錯誤消息爲什麼Exact Target FUEL SDK沒有驗證我的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

預先感謝您。

回答