I want to make a recipe on IFTTT that sends an SMS via Plivo when there is a missed call on my Android phone.
So I chose my Android phone as a trigger and tried using a webhook to POST it to Plivo. But it's not working.
Here is what I put in the recipe:
URL: https://api.plivo.com/v1/Account/MYPLIVOAUTHID/Message/
Method: POST
Content-Type: application/json
Body: {'src': 'SourceNumber', 'dst': '{{FromNumber}}', 'text': 'Sorry I missed your call'}
FromNumber
is derived from the Android phone (the number from which the call was missed)
Error: Applet failed: there was a problem with webhooks service. Action skipped.
The Plivo API uses Basic Auth, and I don't know how to put the accesstoken/pw in IFTTT webhook.
I can't use IFTTT's sms as I dont live in the US/Canada and will go way above its limits. Also can't use Android's sms as there is 100/day limit in my country(India).
Thanks in advance.
You can add an
Authorization
header to include your Basic Auth credentials. You can read more about it here: https://en.wikipedia.org/wiki/Basic_access_authentication#Client_sideTo generate the header, just open up the JS console and use this:
Which gives you the header:
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Alternatively you can try accessing the URL as
auth_id:auth_token@https://api.plivo.com/v1/Account/auth_id/Message/