I enabled HTTP Basic Authentication on my Twilio account under Voice->Settings->General
Then created a voice recording and was able to download it using my account SID & Auth Token
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/ACxxx/Recordings/RExxx" \
-u ACxxx:xxx
I need to be able to access the recording from a web client, without exposing my Twilio Auth Token to the public. According to Twilio docs, I should get a redirect Url, when fetching the recording, but in my above curl example I don't.
Requests to fetch your media will redirect you to a secure URL that is only valid for 4 hours.
I get the same result (recording is downloaded) if I use Authorization header
curl -X GET "https://api.twilio.com/2010-04-01/Accounts/ACxxx/Recordings/RExxx" \
-H "Authorization: Basic xxx"
Any ideas, why I am not getting redirect Url mentioned in Twilio docs?
I opened a ticket with twilio support and they acknowledged there is no support for redirect urls with temporary tokens, for recordings.
They recommended to use Auth tokens, but as I mentioned in the description, this is something I am not willing to do (expose auth tokens to UI)