@@ -112,20 +112,25 @@ def raw_access_token(self) -> Optional[str]:
112112 """
113113 Returns an access token that can be used to authenticate API requests.
114114
115- Note: When using OAuth authentication (client_id/client_secret), this property
116- may perform blocking network operations. For async applications, prefer using
117- the async method `get_raw_access_token()` instead.
115+ Note: When using OAuth authentication (`client_id`/`client_secret`),
116+ this property may perform blocking network operations. For async
117+ applications, prefer using the async property `async_raw_access_token`
118+ instead.
118119 """
119120 return self ._client_wrapper ._get_token ()
120121
121- async def get_raw_access_token (self ) -> Optional [str ]:
122+ @property
123+ async def async_raw_access_token (self ) -> Optional [str ]:
122124 """
123- Asynchronously returns an access token that can be used to authenticate API requests.
125+ Asynchronously returns an access token that can be used to authenticate
126+ API requests.
124127
125- This method is non-blocking and safe to use in async contexts such as FastAPI,
126- Django ASGI, or any other asyncio-based application.
128+ This method is non-blocking and safe to use in async contexts such as
129+ FastAPI, Django ASGI, or any other asyncio-based application.
127130 """
128- return await self ._client_wrapper ._async_get_token ()
131+ if self ._client_wrapper ._async_token is not None :
132+ return await self ._client_wrapper ._async_token ()
133+ return self .raw_access_token
129134
130135
131136def _get_base_url (environment : PipedreamEnvironment ) -> str :
0 commit comments