1
Google API를 통해 고객의 피드를 읽으려고합니다. 액세스 토큰이 있습니다.Google Merchant Center 피드를 나열하는 방법
이것은 내가 다음에 문서입니다 : 여기 https://developers.google.com/shopping-content/developers-guide-python#authentication
예 사용하는 ACCOUNT_ID을 보여 주지만, 어디서이 정보를 수신하는 이해가 안 돼요. 여기
import gdata.contentforshopping.client
ACCOUNT_ID = '1234567'
shopping_client = gdata.contentforshopping.client.ContentForShoppingClient(account_id=ACCOUNT_ID)
내가 지금까지 한 일이다 : 그것은 밝혀졌다
import gdata.contentforshopping.client
import gdata.gauth
part = 2
auth_token = gdata.gauth.OAuth2Token(client_id=CLIENT_ID, client_secret=CLIENT_SECRET, scope=SCOPE, user_agent=USER_AGENT)
shopping_client = gdata.contentforshopping.client.ContentForShoppingClient()
authorize_url = auth_token.generate_authorize_url(redirect_uri=APPLICATION_REDIRECT_URI)
if part == 1:
print 'Please visit: %s' % authorize_url
elif part == 2:
query = {'code': 'xxxx'} # received from result of part == 1
auth_token.get_access_token(query)
auth_token.authorize(shopping_client)
accounts = shopping_client.GetClientAccounts()
print(accounts)