在 Twilio flex 中列出我的电话号码清单 [英] List my phone number inventory inside Twilio flex

查看:71
本文介绍了在 Twilio flex 中列出我的电话号码清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在我的 flex 应用中显示我购买的电话号码列表,以便代理选择从哪个号码拨打电话.

I need to show a list of my purchased phone numbers inside my flex app in order to let the agent choose which number to call from.

我一直在检查 REST 和 flex/manager 文档,但找不到可以让我请求购买号码列表的资源.

I've been checking both REST and flex/manager docs and I can't find a resource that let me request the list of purchased numbers.

回答后有这个 REST API 端点,它可能看起来像我需要的:https://www.twilio.com/docs/电话号码/全球目录/api/活动号码

Edit after an answer: There's this REST API endpoint which may look like what I need: https://www.twilio.com/docs/phone-numbers/global-catalog/api/active-numbers

curl -G https://preview.twilio.com/Numbers/ActiveNumbers/PNyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy.json \
    -u '<ACCOUNT_SID:AUTH_TOKEN>'

但在我看来,它需要电话号码 id 作为 URL 中的参数?(PNyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy)

But as I see it, it needs the phone number id as a parameter in the URL? (PNyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy)

我尝试请求根资源:https://preview.twilio.com/Numbers/ActiveNumbers/但是我得到一个错误:未找到请求的资源/Numbers/ActiveNumbers

I've tried to request the root resource: https://preview.twilio.com/Numbers/ActiveNumbers/ but the I get an error: The requested resource /Numbers/ActiveNumbers was not found

非常感谢您的帮助

推荐答案

列出您帐户的所有 IncomingPhoneNumber 资源

List all IncomingPhoneNumber resources for your account

curl -X GET 'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers.json?PageSize=20' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token

来源:https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource

这篇关于在 Twilio flex 中列出我的电话号码清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆