@@ -45,6 +45,7 @@ def token(
4545 client_id : str ,
4646 client_secret : str ,
4747 scopes : Optional [List [str ]] = None ,
48+ extra : Optional [Dict [str , Any ]] = None ,
4849 ) -> GetTokenResponse :
4950 """Retrieves an access token for the given M2M Client.
5051 Access tokens are JWTs signed with the project's JWKs, and are valid for one hour after issuance.
@@ -54,9 +55,11 @@ def token(
5455 - client_id: The ID of the client.
5556 - client_secret: The secret of the client.
5657 - scopes: An array of scopes requested. If omitted, all scopes assigned to the client will be returned.
58+ - extra: A map of extra parameters to be passed in the body of the request to the token endpoint
5759 """ # noqa
5860
5961 data : Dict [str , Any ] = {
62+ ** extra ,
6063 "grant_type" : "client_credentials" ,
6164 "client_id" : client_id ,
6265 "client_secret" : client_secret ,
@@ -73,6 +76,7 @@ async def token_async(
7376 client_id : str ,
7477 client_secret : str ,
7578 scopes : Optional [List [str ]] = None ,
79+ extra : Optional [Dict [str , Any ]] = None ,
7680 ) -> GetTokenResponse :
7781 """Retrieves an access token for the given M2M Client.
7882 Access tokens are JWTs signed with the project's JWKs, and are valid for one hour after issuance.
@@ -82,9 +86,11 @@ async def token_async(
8286 - client_id: The ID of the client.
8387 - client_secret: The secret of the client.
8488 - scopes: An array scopes requested. If omitted, all scopes assigned to the client will be returned.
89+ - extra: A map of extra parameters to be passed in the body of the request to the token endpoint
8590 """ # noqa
8691
8792 data : Dict [str , Any ] = {
93+ ** extra ,
8894 "grant_type" : "client_credentials" ,
8995 "client_id" : client_id ,
9096 "client_secret" : client_secret ,
0 commit comments