Last active
March 25, 2017 08:00
-
-
Save yuryoparin/a1478e424f3b5db2de8f1d207d5b6864 to your computer and use it in GitHub Desktop.
Статус отправки смс рассылки для адресной книги в ePochta SMS API v3 через bash однострочник
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
#!/bin/bash | |
key='Публичный ключ'; | |
pr_key='Приватный ключ'; | |
action='getCampaignInfo'; echo -e "key=$key;version=3.0;action=$action;id=82614490" | \ | |
tr ';' '\n' | \ | |
sort -t'=' -k1 | \ | |
cut -f2 -d'=' | \ | |
paste -s -d';' - | \ | |
sed "s/;//g;s/$/$pr_key/" | \ | |
tr -d '\n' | \ | |
md5 | \ | |
xargs -I {} curl -s -G -d 'id=82614490' --url "https://api.atompark.com/sms/3.0/$action?key=$key&sum={}" | \ | |
jq '.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment