I'm trying to grab Twilio recordings with the following GET request to their API in my Rails controller:
def myrecordings
account_sid = 'AC32a3c49700934481addd5ce1659f04d2'
auth_token = 'asd89f677asd897asdfd9' #this is made up for now
client = Twilio::REST::Client.new(account_sid, auth_token)
@recordings = client.account.recordings.list()
render :json => @recordings
end
As a result I'm getting a 500 response error with the message "Authenticate"
My application trace is
app/controllers/campaigns_controller.rb:13:in `myrecordings' [the @recordings line]
To the best of my knowledge I'm following what are in the Twilio docs here:
http://www.twilio.com/docs/api/rest/recording
But clearly I'm missing something. The account_sid and auth_token are correct, but is there a security issue?