Skip to content

Commit 243295a

Browse files
support set webhook endpoint
1 parent 8c54202 commit 243295a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/line/bot/client.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,19 @@ def get_webhook_endpoint
655655
get(endpoint, endpoint_path, credentials)
656656
end
657657

658+
# Sets the webhook endpoint URL.
659+
#
660+
# @param webhook_endpoint [String]
661+
#
662+
# @return [Net::HTTPResponse]
663+
def set_webhook_endpoint(webhook_endpoint)
664+
channel_token_required
665+
666+
endpoint_path = '/bot/channel/webhook/endpoint'
667+
body = {endpoint: webhook_endpoint}
668+
put(endpoint, endpoint_path, body.to_json, credentials)
669+
end
670+
658671
def get_liff_apps
659672
channel_token_required
660673

0 commit comments

Comments
 (0)