Open
Description
Describe the bug
In examples/public_oauth.py, trying to access 'self' in a function which is not a method of a class
Code snippet
def example():
"""
Some example usage of message resources.
"""
self.client = Client(
account_sid=ACCOUNT_SID,
credential_provider=ClientCredentialProvider(CLIENT_ID, CLIENT_SECRET),
)
msg = self.client.messages.create(
to=self.to_number, from_=self.from_number, body="hello world"
)
Actual behavior
Fail to run because of trying to access self in function which is not a method of a class
Expected behavior
To create and output a twilio message
twilio-python version
8.0.0-rc.2
Python version
3.12.4
Logs or error messages
No response
Additional context
No response