upload-kakao-brand-message-image
curl --request POST \
--url https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/images \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'file=@example-file;type=image/jpeg' \
--form 'images=@example-file;type=image/jpeg'import requests
url = "https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/images"
files = {
"file": ("example-file", open("example-file", "rb"), "image/jpeg"),
"images": ("example-file", open("example-file", "rb"), "image/jpeg")
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('images', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"images\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/images"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"images\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/images")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"images\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"images\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"images": [
{
"url": "https://mud-kage.kakao.com/example/img_l.jpg"
}
]
},
"error": null
}{
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid Authorization Token"
}
}{
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid Authorization Token"
}
}{
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid Authorization Token"
}
}Kakao Brand Message templates
Upload a Brand Message image
Upload an image for a Kakao Brand Message template or a free-form message.
POST
/
v1
/
projects
/
{projectId}
/
messages
/
kakao-brand-message
/
images
upload-kakao-brand-message-image
curl --request POST \
--url https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/images \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'file=@example-file;type=image/jpeg' \
--form 'images=@example-file;type=image/jpeg'import requests
url = "https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/images"
files = {
"file": ("example-file", open("example-file", "rb"), "image/jpeg"),
"images": ("example-file", open("example-file", "rb"), "image/jpeg")
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('images', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/images', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"images\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/images"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"images\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/images")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"images\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.notifly.tech/v1/projects/{projectId}/messages/kakao-brand-message/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"images\"; filename=\"example-file\"\r\nContent-Type: image/jpeg\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"images": [
{
"url": "https://mud-kage.kakao.com/example/img_l.jpg"
}
]
},
"error": null
}{
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid Authorization Token"
}
}{
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid Authorization Token"
}
}{
"data": null,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid Authorization Token"
}
}Upload the image to Kakao BizMessage before using it in a Brand Message template or a free-form message. Put the returned
data.images[].url value in the image field of the create-template or send request.Use the dimensions and width-to-height ratios for the image type.
Upload JPG or PNG files of up to 5 MB each.
type | Use | Size and aspect ratio |
|---|---|---|
image | Image and commerce messages | 800 × 400 px recommended. Minimum width 500 px. Ratio 3:4 to 2:1. |
wide-image | Wide image messages | 800 × 600 px recommended. Minimum width 500 px. Ratio 1:1 to 2:1. |
wide-itemlist-first-image | Main wide item list image | Minimum width 500 px. Ratio 2:1. |
wide-itemlist-image | Secondary wide item list image | Minimum width 500 px. Ratio 1:1. |
carousel-image | Carousel feed | 800 × 600 px or 800 × 400 px recommended. Minimum width 500 px. Ratio 3:4 to 2:1. |
carousel-commerce-image | Carousel commerce | 800 × 600 px or 800 × 400 px recommended. Minimum width 500 px. Ratio 3:4 to 2:1. Use the same ratio for every image. |
Authorizations
Body
multipart/form-data
