From 222a594367eb9669eff1c465cc50e25aabac9869 Mon Sep 17 00:00:00 2001 From: Shubham Date: Mon, 21 Apr 2025 16:28:41 +0530 Subject: [PATCH 1/2] chore: fix oauth examples --- examples/public_oauth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/public_oauth.py b/examples/public_oauth.py index 527961f4e3..41eb589c37 100644 --- a/examples/public_oauth.py +++ b/examples/public_oauth.py @@ -17,12 +17,12 @@ def example(): """ Some example usage of message resources. """ - self.client = Client( + client = Client( account_sid=ACCOUNT_SID, credential_provider=ClientCredentialProvider(CLIENT_ID, CLIENT_SECRET), ) - msg = self.client.messages.create( + msg = client.messages.create( to=self.to_number, from_=self.from_number, body="hello world" ) From 1deb2b55ea2c3309b7a300ad3814c92e5e06f05d Mon Sep 17 00:00:00 2001 From: Shubham Date: Mon, 21 Apr 2025 16:29:46 +0530 Subject: [PATCH 2/2] chore: Update organization_api.py --- examples/organization_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/organization_api.py b/examples/organization_api.py index 180f18c20b..0d653c12a4 100644 --- a/examples/organization_api.py +++ b/examples/organization_api.py @@ -16,12 +16,12 @@ def example(): """ Some example usage of using organization resources """ - self.client = Client( + client = Client( account_sid=ACCOUNT_SID, credential_provider=OrgsCredentialProvider(CLIENT_ID, CLIENT_SECRET), ) - accounts = self.client.preview_iam.organization( + accounts = client.preview_iam.organization( organization_sid=ORGS_SID ).accounts.stream() for record in accounts: