콘텐츠로 이동

이미지 업로드

Endpoint

[POST] API URL 정보

https://patch-kakao-api.happytalk.io/kakaoWebhook/v3/bzc/image/upload
https://kakao-api.happytalk.io/kakaoWebhook/v3/bzc/image/upload

Introduce

Introduce
상담톡 메시지로 전송할 이미지 파일을 서버에 업로드하는 API입니다.

Request (Multipart Form Data)

Field Name Type Required Description
Content-type Text Y multipart/form-data
HT-Client-Id Text Y 고객센터에서 발급 받은 key
HT-Client-Secret Text Y 고객센터에서 발급 받은 token

Body

Field Name Type Required Description
sender_key Text(40) Y 발신프로필 키
image binary Y 업로드할 이미지 파일
image_type Text N rich 메시지에 사용할 이미지는 "rich"로 요청

Example

REST API Sample
curl -L -X POST 'https://patch-kakao-api.happytalk.io/kakaoWebhook/v3/bzc/image/upload' \
-H 'HT-Client-Id: example-id' \
-H 'HT-Client-Secret: example-secret' \
-F 'sender_key="example-sender_key"' \
-F 'image=@"{filepath}/image.jpg"'
curl -L -X POST 'https://kakao-api.happytalk.io/kakaoWebhook/v3/bzc/image/upload' \
-H 'HT-Client-Id: example-id' \
-H 'HT-Client-Secret: example-secret' \
-F 'sender_key="example-sender_key"' \
-F 'image=@"{filepath}/image.jpg"'

Response (Json)

Parameter

Field Name Type Description
code Text 처리 결과 코드 (0000은 정상 / 나머지는 오류)
message Text 처리 실패 시 결과 메시지
image Text 업로드된 이미지 경로

Example

Success
{
    "code": "0000",
    "image": "http://api1-kage.kakao.com/dn/Qf8UU/ZSmRY2uDCg/n11R9lLXCWn82AR29zkt0k/img_l.jpg"
}
Failure
{
    "code": "-505",
    "message": "InvalidImageSizeException"
}

Data Dictionary

Data Dictionary

None

None

Reference

코드 정의