Package io.sendon.kakao
Class SendonKakao
java.lang.Object
io.sendon.base.SendonClient
io.sendon.kakao.SendonKakao
The
SendonKakao class provides methods to interact with the Kakao messaging API.
It supports operations such as sending messages, managing templates, and handling profiles.-
Field Summary
Fields inherited from class io.sendon.base.SendonClient
gson, httpClient -
Constructor Summary
ConstructorsConstructorDescriptionSendonKakao(String userId, String apiKey) Constructs a newSendonKakaoinstance with the specified user ID and API key.SendonKakao(String userId, String apiKey, boolean useOkHttp) Constructs a newSendonKakaoinstance with the specified user ID, API key, and HTTP client option. -
Method Summary
Modifier and TypeMethodDescriptioncancelGroup(String groupId) cancelReviewTemplate(String profileId, String templateId) createBrandMessageCarouselFeedTemplate(String sendProfileId, BrandMessageCarouselFeedTemplateRequest request) createBrandMessageImageTemplate(String sendProfileId, BrandMessageImageTemplateRequest request) createBrandMessageTextTemplate(String sendProfileId, BrandMessageTextTemplateRequest request) createBrandMessageWideItemListTemplate(String sendProfileId, BrandMessageWideItemListTemplateRequest request) createBrandMessageWideTemplate(String sendProfileId, BrandMessageWideTemplateRequest request) createTemplate(String profileId, Template template) Creates a new template for a specific profile.deleteBrandMessageTemplate(String sendProfileId, String templateCode) deleteTemplate(String profileId, String templateId) Deletes a specific template for a profile.getBrandMessageTemplate(String sendProfileId, String templateCode) getBrandMessageTemplates(String sendProfileId, BrandMessageTemplateQuery query) getProfileDetail(String profileId) Retrieves the details of a specific profile.getProfiles(int limit, String cursor) Retrieves a list of profiles with pagination support.getTemplateDetail(String profileId, String templateId) getTemplates(String profileId, String keyword, int limit, String cursor, TemplateStatus status, TemplateQuerySort sort) Retrieves a list of templates for a specific profile with filtering and sorting options.registerProfile(Profile profile) Registers a new profile with the given details.requestAuthToken(String channelId, String phoneNumber) Requests an authentication token for a specific channel and phone number.requestReviewTemplate(String profileId, String templateId) Requests a review for a specific template.sendAlimtalk(AlimtalkBuilder builder) Sends an Alimtalk message using a builder.sendAlimtalk(String profileId, String templateId, List<?> to, Reservation reservation, Fallback fallback) Sends an Alimtalk message with reservation and fallback options.sendBrandMessage(BrandMessageSendBuilder builder) sendFriendtalk(FriendtalkBuilder builder) Sends a Friendtalk message using a builder.sendFriendtalk(String profileId, String templateId, List<?> to, FriendtalkMessageType messageType, String message, List<Button> buttons, boolean isAd, Reservation reservation, Fallback fallback, Image image) Sends a Friendtalk message.updateBrandMessageCarouselFeedTemplate(String sendProfileId, String templateCode, BrandMessageCarouselFeedTemplateRequest request) updateBrandMessageImageTemplate(String sendProfileId, String templateCode, BrandMessageImageTemplateRequest request) updateBrandMessageTextTemplate(String sendProfileId, String templateCode, BrandMessageTextTemplateRequest request) updateBrandMessageWideItemListTemplate(String sendProfileId, String templateCode, BrandMessageWideItemListTemplateRequest request) updateBrandMessageWideTemplate(String sendProfileId, String templateCode, BrandMessageWideTemplateRequest request) updateTemplate(String profileId, String templateId, Template template) Updates an existing template for a specific profile.uploadAlimtalkImage(File image) uploadBrandMessageImage(File file) uploadFallbackImage(List<File> images) Methods inherited from class io.sendon.base.SendonClient
delete, get, parseJsonResponse, post, postImagesWithMultipartFormData, postImageWithMultipartFormData, postImageWithMultipartFormData, put
-
Constructor Details
-
SendonKakao
Constructs a newSendonKakaoinstance with the specified user ID and API key.- Parameters:
userId- The user ID for authentication.apiKey- The API key for authentication.
-
SendonKakao
Constructs a newSendonKakaoinstance with the specified user ID, API key, and HTTP client option.- Parameters:
userId- The user ID for authentication.apiKey- The API key for authentication.useOkHttp- Whether to use OkHttp as the HTTP client.
-
-
Method Details
-
requestAuthToken
Requests an authentication token for a specific channel and phone number.- Parameters:
channelId- The ID of the channel.phoneNumber- The phone number to authenticate.- Returns:
- The response containing the authentication token. See
RequestAuthToken.
-
registerProfile
Registers a new profile with the given details.- Parameters:
profile- The profile details to register. SeeProfile.- Returns:
- The response of the profile registration. See
RegisterProfile.
-
getProfiles
Retrieves a list of profiles with pagination support.- Parameters:
limit- The maximum number of profiles to retrieve.cursor- The cursor for pagination.- Returns:
- The response containing the list of profiles. See
GetProfiles.
-
getProfileDetail
Retrieves the details of a specific profile.- Parameters:
profileId- The ID of the profile to retrieve.- Returns:
- The response containing the profile details. See
GetProfileDetail.
-
createTemplate
Creates a new template for a specific profile.- Parameters:
profileId- The ID of the profile.template- The template details to create. SeeTemplate.- Returns:
- The response of the template creation. See
CreateTemplate.
-
getTemplates
public GetTemplates getTemplates(String profileId, String keyword, int limit, String cursor, TemplateStatus status, TemplateQuerySort sort) Retrieves a list of templates for a specific profile with filtering and sorting options.- Parameters:
profileId- The ID of the profile.keyword- The keyword to filter templates.limit- The maximum number of templates to retrieve.cursor- The cursor for pagination.status- The status to filter templates. SeeTemplateStatus.sort- The sorting option for templates. SeeTemplateQuerySort.- Returns:
- The response containing the list of templates. See
GetTemplates.
-
deleteTemplate
Deletes a specific template for a profile.- Parameters:
profileId- The ID of the profile.templateId- The ID of the template to delete.- Returns:
- The response of the template deletion. See
DeleteTemplate.
-
updateTemplate
Updates an existing template for a specific profile.- Parameters:
profileId- The ID of the profile.templateId- The ID of the template to update.template- The updated template details. SeeTemplate.- Returns:
- The response of the template update. See
UpdateTemplate.
-
requestReviewTemplate
Requests a review for a specific template.- Parameters:
profileId- The ID of the profile.templateId- The ID of the template to review.- Returns:
- The response of the review request. See
RequestReviewTemplate.
-
cancelReviewTemplate
-
getTemplateDetail
-
createBrandMessageTextTemplate
public BrandMessageTemplateIdResponse createBrandMessageTextTemplate(String sendProfileId, BrandMessageTextTemplateRequest request) -
createBrandMessageImageTemplate
public BrandMessageTemplateIdResponse createBrandMessageImageTemplate(String sendProfileId, BrandMessageImageTemplateRequest request) -
createBrandMessageWideTemplate
public BrandMessageTemplateIdResponse createBrandMessageWideTemplate(String sendProfileId, BrandMessageWideTemplateRequest request) -
createBrandMessageWideItemListTemplate
public BrandMessageTemplateIdResponse createBrandMessageWideItemListTemplate(String sendProfileId, BrandMessageWideItemListTemplateRequest request) -
createBrandMessageCarouselFeedTemplate
public BrandMessageTemplateIdResponse createBrandMessageCarouselFeedTemplate(String sendProfileId, BrandMessageCarouselFeedTemplateRequest request) -
updateBrandMessageTextTemplate
public BrandMessageTemplateIdResponse updateBrandMessageTextTemplate(String sendProfileId, String templateCode, BrandMessageTextTemplateRequest request) -
updateBrandMessageImageTemplate
public BrandMessageTemplateIdResponse updateBrandMessageImageTemplate(String sendProfileId, String templateCode, BrandMessageImageTemplateRequest request) -
updateBrandMessageWideTemplate
public BrandMessageTemplateIdResponse updateBrandMessageWideTemplate(String sendProfileId, String templateCode, BrandMessageWideTemplateRequest request) -
updateBrandMessageWideItemListTemplate
public BrandMessageTemplateIdResponse updateBrandMessageWideItemListTemplate(String sendProfileId, String templateCode, BrandMessageWideItemListTemplateRequest request) -
updateBrandMessageCarouselFeedTemplate
public BrandMessageTemplateIdResponse updateBrandMessageCarouselFeedTemplate(String sendProfileId, String templateCode, BrandMessageCarouselFeedTemplateRequest request) -
getBrandMessageTemplate
public BrandMessageTemplateDetailResponse getBrandMessageTemplate(String sendProfileId, String templateCode) -
getBrandMessageTemplates
public BrandMessageTemplateListResponse getBrandMessageTemplates(String sendProfileId, BrandMessageTemplateQuery query) -
deleteBrandMessageTemplate
public BrandMessageDeleteResponse deleteBrandMessageTemplate(String sendProfileId, String templateCode) -
sendBrandMessage
-
uploadBrandMessageImage
-
uploadBrandMessageWideImage
-
uploadAlimtalkImage
-
uploadFallbackImage
-
getGroup
-
cancelGroup
-
sendGroup
-
sendAlimtalk
public SendAlimtalk sendAlimtalk(String profileId, String templateId, List<?> to, Reservation reservation, Fallback fallback) Sends an Alimtalk message with reservation and fallback options.- Parameters:
profileId- The profile ID.templateId- The template ID.to- The list of recipients. Can beList<String>orList<ToWithVariable>.reservation- The reservation details for scheduling. SeeReservation.fallback- The fallback options. SeeFallback.- Returns:
- The response of the Alimtalk send operation. See
SendAlimtalk.
-
sendAlimtalk
Sends an Alimtalk message using a builder.- Parameters:
builder- TheAlimtalkBuildercontaining the Alimtalk message details.- Returns:
- The response of the Alimtalk send operation. See
SendAlimtalk.
-
sendFriendtalk
Sends a Friendtalk message using a builder.- Parameters:
builder- TheFriendtalkBuildercontaining the Friendtalk message details.- Returns:
- The response of the Friendtalk send operation. See
SendFriendtalk.
-
sendFriendtalk
public SendFriendtalk sendFriendtalk(String profileId, String templateId, List<?> to, FriendtalkMessageType messageType, String message, List<Button> buttons, boolean isAd, Reservation reservation, Fallback fallback, Image image) Sends a Friendtalk message.- Parameters:
profileId- The profile ID.templateId- The template ID.to- The list of recipients. Can beList<String>(phone numbers) orList<ToWithVariable>(recipients with variables).message- The message content.buttons- The list of buttons. SeeButton.isAd- Whether the message is an advertisement.reservation- The reservation details for scheduling. SeeReservation.fallback- The fallback options. SeeFallback.image- The image details. SeeImage.- Returns:
- The response of the Friendtalk send operation. See
SendFriendtalk.
-