我有一个发送短信的twilio帐户 . 但是,我需要有关如何通过调用其API来查看我的帐户电话号码列表的指导 . 我试图浏览API中的不同菜单,但我没有看到任何选项来获取我的帐户电话号码列表 . 提前感谢您的指导 .
Twilio开发者传道者在这里 .
如果您想通过API列出Twilio帐户中的电话号码,您需要Incoming Phone Numbers list resource .
你可以使用Twilio rubygem轻松访问它,如下所示:
require 'twilio-ruby' @client = Twilio::REST::Client.new YOUR_ACCOUNT_SID, YOUR_AUTH_TOKEN numbers = @client.account.incoming_phone_numbers.list numbers.each do |number| # do something with the number puts number.phone_number end
1 回答
Twilio开发者传道者在这里 .
如果您想通过API列出Twilio帐户中的电话号码,您需要Incoming Phone Numbers list resource .
你可以使用Twilio rubygem轻松访问它,如下所示: