Created
January 27, 2020 07:22
-
-
Save Porrapat/680d21bb5e3a12760e968452c1b218a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To use : add your line notify api token | |
LINE_NOTIFY_ACCESS_TOKEN= | |
# Provide your multiline text. We use shell script heredoc syntax here. | |
MESSAGE=$(cat << END_HEREDOC | |
HELLO LINE 1 | |
HELLO LINE 2 | |
END_HEREDOC | |
) | |
# Basic Implementation | |
curl -X POST -H "Authorization: Bearer $LINE_NOTIFY_ACCESS_TOKEN" -d "&message=$MESSAGE" "https://notify-api.line.me/api/notify" | |
# # Send Sticker Too | |
# curl -X POST -H "Authorization: Bearer $LINE_NOTIFY_ACCESS_TOKEN" -d "&message=$MESSAGE" -d "stickerPackageId=1" -d "stickerId=407" "https://notify-api.line.me/api/notify" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment