Recent searches


No recent searches

헬프센터의 가이드 문서에 등록된 파일 API 로 들고 올 수 있나요?



Posted Jul 15, 2024

가이드 문서 API 로 정보 확인 중인데 아무리 봐도 문서 등록중 같이 올렸던 파일이 확인이 안됩니다.

 

https://developer.zendesk.com/api-reference/help_center/help-center-api/articles/

 

혹시 API 나 아니면 등록했던 파일 가져올 수 있는 방법이 있을까요?


0

2

2 comments

아 해결되었습니다. 감사합니다.

0


image avatar

JV Woo

Zendesk Luminary

안녕하세요 백승준님,
 
Article Attachments를 통해 받으신 Link를 get 메소드를 사용하셔서 파일형태로 저장하시면 됩니다.
아래는 파이썬 코드의 예시 입니다.
 
file_response = requests.get(file_url, auth=HTTPBasicAuth(f'{zendesk_email}/token', api_token), stream=True)

if file_response.status_code == 200:
with open(file_name, 'wb') as f:
for chunk in file_response.iter_content(chunk_size=1024):
f.write(chunk)
print(f'Successfully downloaded: {file_name}')
else:
print(f'Failed to download file: {file_name}')

1


Please sign in to leave a comment.

Didn't find what you're looking for?

New post