Plivo API创建子帐户,无法启用子帐户

时间:2018-04-23 20:47:18

标签: node.js plivo

使用Plivo API,我可以创建子帐户,但子帐户仍然处于禁用状态。我无法看到我做错了什么,要么文档错误,要么API中存在错误。似乎enabled: true没有做任何事情。有什么想法吗?感谢

var plivo = require('plivo');
var plivoclient = new plivo.Client(auth_id, auth_token);
plivoclient.subAccounts.create("subaccount name", {
     enabled: true
})

1 个答案:

答案 0 :(得分:0)

替换以下内容

plivoclient.subAccounts.create("subaccount name", {enabled: true})

使用

plivoclient.subAccounts.create("subaccount name", true)

参考:https://github.com/plivo/plivo-node/blob/master/lib/resources/accounts.js#L118