【发布时间】:2013-06-05 00:08:56
【问题描述】:
我正在尝试在我的 Rails 控制器中使用以下 GET 请求获取 Twilio 记录:
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
因此,我收到 500 响应错误消息“Authenticate”
我的应用程序跟踪是
app/controllers/campaigns_controller.rb:13:in `myrecordings' [@recordings 行]
据我所知,我正在关注 Twilio 文档中的内容:
http://www.twilio.com/docs/api/rest/recording
但显然我错过了一些东西。 account_sid 和 auth_token 是正确的,但是否存在安全问题?
【问题讨论】:
-
错误是什么?第 13 行,但它是零吗?还是没有足够的参数?
标签: ruby-on-rails twilio