Skip to content

Instantly share code, notes, and snippets.

@Porrapat
Created January 27, 2020 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Porrapat/680d21bb5e3a12760e968452c1b218a8 to your computer and use it in GitHub Desktop.
Save Porrapat/680d21bb5e3a12760e968452c1b218a8 to your computer and use it in GitHub Desktop.
# 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