Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python sample에서 uri=/stat 호출시 잘못된 파라미터 형식 #996

Open
tunakang opened this issue Sep 23, 2024 · 0 comments
Open

Comments

@tunakang
Copy link

안녕하세요.
@naver-searchad Naver API 담당자님.

제공해주신 python-sample 코드를 수정 없이 사용할 때, 아래 부분에서 문제가 발생하여 문의드립니다.

# 1. GET Summary Report per multiple entities 

uri = '/stats'
method = 'GET'
stat_ids = [target_adgroup['nccCampaignId'], target_adgroup['nccAdgroupId']]
r = requests.get(BASE_URL + uri, params={'ids': stat_ids, 'fields': '["clkCnt","impCnt","salesAmt", "ctr", "cpc", "avgRnk", "ccnt"]', 'timeRange': '{"since":"2019-06-01","until":"2019-06-25"}'}, headers=get_header(method, uri, API_KEY, SECRET_KEY, CUSTOMER_ID))

print("response status_code = {}".format(r.status_code))
print("response body = {}".format(r.json()))

코드는 위와 같고 python-sample과 동일합니다.
그리고 아래와 같이 출력 됩니다.

response status_code = 400
response body = {'code': 11001, 'message': '잘못된 파라미터 형식입니다.'}

naver-openapi-guide를 살펴보니 param이 잘못 설정된 것 같은데요.
image

살펴보니 #976 이것과 동일한 이슈 같은데, 어떻게 해결할 수 있을까요??

답변해주시면 감사하겠습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant