@@ -27,7 +27,12 @@ def with_raw_response(self) -> RawOauthTokensClient:
2727 return self ._raw_client
2828
2929 def create (
30- self , * , client_id : str , client_secret : str , request_options : typing .Optional [RequestOptions ] = None
30+ self ,
31+ * ,
32+ client_id : str ,
33+ client_secret : str ,
34+ scope : typing .Optional [str ] = OMIT ,
35+ request_options : typing .Optional [RequestOptions ] = None ,
3136 ) -> CreateOAuthTokenResponse :
3237 """
3338 Exchange OAuth credentials for an access token
@@ -38,6 +43,9 @@ def create(
3843
3944 client_secret : str
4045
46+ scope : typing.Optional[str]
47+ Optional space-separated scopes for the access token. Defaults to '*'.
48+
4149 request_options : typing.Optional[RequestOptions]
4250 Request-specific configuration.
4351
@@ -62,7 +70,7 @@ def create(
6270 )
6371 """
6472 _response = self ._raw_client .create (
65- client_id = client_id , client_secret = client_secret , request_options = request_options
73+ client_id = client_id , client_secret = client_secret , scope = scope , request_options = request_options
6674 )
6775 return _response .data
6876
@@ -83,7 +91,12 @@ def with_raw_response(self) -> AsyncRawOauthTokensClient:
8391 return self ._raw_client
8492
8593 async def create (
86- self , * , client_id : str , client_secret : str , request_options : typing .Optional [RequestOptions ] = None
94+ self ,
95+ * ,
96+ client_id : str ,
97+ client_secret : str ,
98+ scope : typing .Optional [str ] = OMIT ,
99+ request_options : typing .Optional [RequestOptions ] = None ,
87100 ) -> CreateOAuthTokenResponse :
88101 """
89102 Exchange OAuth credentials for an access token
@@ -94,6 +107,9 @@ async def create(
94107
95108 client_secret : str
96109
110+ scope : typing.Optional[str]
111+ Optional space-separated scopes for the access token. Defaults to '*'.
112+
97113 request_options : typing.Optional[RequestOptions]
98114 Request-specific configuration.
99115
@@ -126,6 +142,6 @@ async def main() -> None:
126142 asyncio.run(main())
127143 """
128144 _response = await self ._raw_client .create (
129- client_id = client_id , client_secret = client_secret , request_options = request_options
145+ client_id = client_id , client_secret = client_secret , scope = scope , request_options = request_options
130146 )
131147 return _response .data
0 commit comments