日本語コミュニティーへようこそ!このチャンネルは現在ベータ版です。

詳細はこちらをご覧ください。

No data on call to get in python

新メンバー

Im attempting to make a call to the get all deals method. I wrote a small python script to return the deals in a python dictionary. For some reason when i print the dict the fields are there, but there is no populated data. Any idea what the problem could be? Thanks!

返信
0 いいね!
3件の返信3
コミュニティーマネージャー

@miketech do you have an example of the data you are seeing? or the request that you’re making?

返信
0 いいね!
Highlighted
新メンバー

import urllib2, json
APIKEY_VALUE = '325921d8-c8d5-4b99-a59d-0a9a940745ff’
APIKEY = ‘?hapikey=’ + APIKEY_VALUE
HS_API_URL = ‘https://api.hubapi.com/deals/v1/deal/recent/modified

def getDeals():

url = HS_API_URL + APIKEY 

response = urllib2.urlopen(url).read()

statistics = json.loads(response)

return statistics

its returning the dictionaries,but theyre empty…

返信
0 いいね!
コミュニティーマネージャー

@miketech that API key was for your Developer portal, so normally it won’t have any actual data in it. You’d need to create a test portal, which you can find in the navigation menu when logged into your Developer portal. After creating a test portal, you can get the API key for the test portal:

How do I get my HubSpot API key?

Marketing Basic, Professional, and Enterprise customers and portals with a CRM can access the HubSpot API. Learn how to access your HubSpot API key here.

返信
0 いいね!