我使用的是python Twilio API。
给定子账号sid,有没有办法获取该子账号的现有api密钥。仅使用主api凭据,而不使用子帐户凭据。
我尝试列出所有子账号并列出所有api密钥,但我无法获得指定子账号的api密钥。
发布于 2017-07-22 04:20:27
Twilio开发者的布道者在这里。
您可以通过先抓取子帐户本身,然后获取该帐户的fetching the API keys来获取resources for a subaccount。
要在Python中执行此操作,应如下所示:
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "YOUR_ACCOUNT_TOKEN"
auth_token = "YOUR_AUTH_TOKEN"
client = Client(account_sid, auth_token)
subaccount = client.api.accounts("SUBACCOUNT_SID")
keys = subaccount.keys.list()如果有任何帮助,请告诉我。
https://stackoverflow.com/questions/45245625
复制相似问题