Chad
Chad

Reputation: 2289

Can a "Main" type Twilio API Key access subaccounts created through my Twilio Connect App?

I'm looking to clean up some API Key usage in my app and noticed that I am using my main Twilio Account SID and token instead of an API Key.

I have a Twilio Connect App that my customers use to delegate access to their accounts to send SMS. According to the Twilio Connect App documentation, authorizing a Twilio Connect App to access your account creates a subaccount for the 3rd-party (in this case, my application) to use.

The Twilio docs for subaccounts (at the time of writing, July 5, 2024) state:

You can use your main account credentials (AccountSid and AuthToken) to access Twilio's REST API for your main account, as well as v2010 API resources for any of your subaccounts. You may also use a subaccount's AccountSid and AuthToken to access the resources of that subaccount.

and

Main account API Keys are only available to access main account resources. Access to subaccount resources will be denied.

However, in the API Key documentation (again, at the time of writing this, July 5, 2024), it states:

Standard API Keys give you access to all the functionality in Twilio's API, except for managing API Keys, Account Configuration, and Subaccounts.

Main API Keys have the same access as Standard Keys, and can also manage API Keys, Account Configuration, and Subaccounts. Main API Keys give you the same level of access as if you were using account API Credentials.

So the question is: Will API Keys of type "main" be able to access the subaccounts created as a part of authorizing my Twilio Connect App?

Upvotes: 0

Views: 60

Answers (1)

Chad
Chad

Reputation: 2289

I have learned through experimentation that the answer is no. Only the account auth token works. API Key tokens, even those of “main” type, do not work for accessing connected app subaccounts.

Upvotes: 0

Related Questions