如何在 Twilio 中获取购买的 phone 号码的位置
How to get the location of a purchased phone number in Twilio
我正在使用 Twilio 开发一个项目 API。我注意到 availablePhoneNumbers 集合向我们发送了可用号码、它们的地理位置、费率中心以及很多关于我将要购买的号码的非常有用的信息。
购买号码后,我发现 incomingPhoneNumbers 集合中没有 phone 位置、ISO 国家等任何信息!
有没有办法为已购买的号码检索此信息,或者我应该为从 availablePhoneNumbers 获得的每个号码保存它以备日后购买吗?
此外,我想这是另一个问题,似乎没有办法通过 API 知道号码是否在国际上启用 send/receive calls/SMS。我需要通过 API 自动购买号码,虽然他们的前端允许我在购买之前查看号码是否有某些限制,但我找不到 API 方法来这样做。例如,API 只是说明一个号码是否可以发送或接收 SMS,但它没有说明它是否可以 send/receive 他们 to/from 来自本国的号码。
谢谢!
此处为 Twilio 开发人员布道师。
如果您想使用从 Available Phone Numbers resource then you will want to cache it somewhere it until you buy the number. You can get the ISO country code of a number if you use the Lookups API 返回的有关 phone 号码的所有数据。仅美国和加拿大支持 phone 个号码的位置。
至于你的其他问题,恐怕目前不属于 API,但我在 Twilio 中进行了查询,这是我们正在研究的一项改进,因此请留意未来。
到了 2022 年,我们似乎仍然没有解决这个问题的好方法。
The current IncomingPhoneNumber
resource doesn't seem to have any regional information (eg, city, state), though a new (and generally unavailable ) Active Numbers API 在 items.*.geography
下有可靠的信息...只是令人失望的是它在私人开发预览中。
似乎应该可以访问此信息,因为 Twilio 自己的控制台会为 the index page 上的每个活动号码显示 city/state。
我正在使用 Twilio 开发一个项目 API。我注意到 availablePhoneNumbers 集合向我们发送了可用号码、它们的地理位置、费率中心以及很多关于我将要购买的号码的非常有用的信息。
购买号码后,我发现 incomingPhoneNumbers 集合中没有 phone 位置、ISO 国家等任何信息!
有没有办法为已购买的号码检索此信息,或者我应该为从 availablePhoneNumbers 获得的每个号码保存它以备日后购买吗?
此外,我想这是另一个问题,似乎没有办法通过 API 知道号码是否在国际上启用 send/receive calls/SMS。我需要通过 API 自动购买号码,虽然他们的前端允许我在购买之前查看号码是否有某些限制,但我找不到 API 方法来这样做。例如,API 只是说明一个号码是否可以发送或接收 SMS,但它没有说明它是否可以 send/receive 他们 to/from 来自本国的号码。
谢谢!
此处为 Twilio 开发人员布道师。
如果您想使用从 Available Phone Numbers resource then you will want to cache it somewhere it until you buy the number. You can get the ISO country code of a number if you use the Lookups API 返回的有关 phone 号码的所有数据。仅美国和加拿大支持 phone 个号码的位置。
至于你的其他问题,恐怕目前不属于 API,但我在 Twilio 中进行了查询,这是我们正在研究的一项改进,因此请留意未来。
到了 2022 年,我们似乎仍然没有解决这个问题的好方法。
The current IncomingPhoneNumber
resource doesn't seem to have any regional information (eg, city, state), though a new (and generally unavailable ) Active Numbers API 在 items.*.geography
下有可靠的信息...只是令人失望的是它在私人开发预览中。
似乎应该可以访问此信息,因为 Twilio 自己的控制台会为 the index page 上的每个活动号码显示 city/state。