如何将电话号码从主帐户转移到子帐户 [英] How to transfer phone number from master account to subaccount

查看:84
本文介绍了如何将电话号码从主帐户转移到子帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了 twilio 中的教程,但不太清楚.

I have read the tutorial in twilio but its not quite clear.

有人可以列出一步一步的程序吗?

Can someone lay down the step by step procedure please?

这是我从 twilio 得到的:

Here is what I got from twilio:

在帐户之间交换电话号码

Exchanging Phone Numbers Between Accounts

您可以在子账户之间以及您的主账户和您的任何一个子账户之间转移号码.发出 API 请求以转移电话号码时,您必须使用主帐户的凭据.

You can transfer numbers between subaccounts, and between your master account and any one of your subaccounts. You must use your master account's credentials when making the API request to transfer a phone number.

要在您控制的两个帐户之间转移电话号码,请向 IncomingPhoneNumber 实例资源 URI 发出 HTTP POST 请求.在 POST 的正文中,将参数AccountSid"设置为您希望拥有该号码的帐户的 AccountSid.这将从其原始帐户中删除电话号码,并使其在新帐户的 IncomingPhoneNumbers 列表资源下可用,同时保留所有其他属性.

To transfer a phone number between two accounts that you control, make an HTTP POST request to an IncomingPhoneNumber instance resource URI. In the body of the POST set the parameter 'AccountSid' to the AccountSid of the account you wish to own that number. This will remove the phone number from its original account and make it available under the IncomingPhoneNumbers list resource of the new account while retaining all other properties.

请记住,如上所述关闭子帐户将释放该帐户的所有电话号码,因此如果您想保留它们,您可以考虑事先将所有号码转移到您的主帐户.

Remember, closing a subaccount as described above will release all of that account's phone numbers, so you might consider transferring all numbers to your master account beforehand if you want to keep them.

推荐答案

一行 curl https://curl.haxx.se/.

您需要知道:

  • 来自当前电话号码所在的帐户

  • from the account where the phone number currently is

SOURCE-ACCOUNT-SID

PHONE-NUMBER-SID

来自将要转移电话号码的帐户

from the account where the phone number will be transfered

DESTINATION-ACCOUNT-SID

来自您的主 Twilio 帐户

from your master Twilio account

MASTER-ACCOUNT-SID

MASTER-ACCOUNT-TOKEN

命令如下:

curl -XPOST https://api.twilio.com/2010-04-01/Accounts/SOURCE-ACCOUNT-SID/IncomingPhoneNumbers/PHONE-NUMBER-SID.json -d "AccountSid=DESTINATION-ACCOUNT-SID" -u "MASTER-ACCOUNT-SID:MASTER-ACCOUNT-TOKEN"

.

注意:当你替换值时,它看起来像这样

Note: when you replace the values it looks something like this

<代码>卷曲-XPOST https://api.twilio.com/2010-04-01/Accounts/AC0123456789abcdefabcdefabcdefabcd/IncomingPhoneNumbers/PN0123456789abcdefabcdefabcdefabcd.json -d AccountSid = AC0123456789abcdefabcdefabcdefabcd" -U AC0123456789abcdefabcdefabcdefabcd:0123456789abcdefabcdefabcdefabcd"

这篇关于如何将电话号码从主帐户转移到子帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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