Subaccount Ignored Using Main Account Authentication for TFV
Open
Nobody has claimed this yet.
priority: medium
type: bug
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 815
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 2
Description
Issue Summary
Using main account authentication to access toll-free verification info for a subaccount returns the results for the main account, ignoring the subaccount argument entirely
Steps to Reproduce
- Create a toll-free number on your main account
- Create a toll-free verification for the number on your main account
- Create a subaccount under the main account
- Create a toll-free number on the subaccount
- Note that using your subaccount sid as the third argument to
Clientand your main account sid and auth token as the first and second args allows you to fetch this number from the API - Create a toll-free verification for the number on the subaccount
- Note that using your subaccount sid as the third argument to
Clientand your main account sid and auth token as the first and second args fetches the toll-free verification for the main account number, not the subaccount number!
Code Snippet
>>> from twilio.rest import Client
>>> Client(MAIN_ACCT_SID, MAIN_ACCT_TOKEN, SUBACCT_SID).incoming_phone_numbers.list() # Shows subaccount numbers
>>> Client(MAIN_ACCT_SID, MAIN_ACCT_TOKEN, SUBACCT_SID).messaging.v1.tollfree_verifications.list() # Shows main account toll-free verifications
Exception/Log
N/A
Technical details:
- twilio-python version: 9.0.3
- python version: Python 3.11.8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by tracing how Client's third subaccount argument is applied to incoming_phone_numbers.list() and messaging.v1.tollfree_verifications.list(), then compare their request construction. Done means toll-free verification results are scoped to the subaccount, matching the incoming phone number behavior, with coverage for the reproduced calls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100