File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -252,16 +252,18 @@ def _handle_response(self, response):
252252 pass
253253 return data
254254
255- def client_credentials_token (self , scope = None ):
255+ def client_credentials_token (self , audience = None , scope = None ):
256256 if not self .client_secret :
257257 raise presalytics .lib .exceptions .ApiError (message = "Must have client secret for client credentials grant" , status_code = 400 )
258+ if not audience :
259+ audience = self .audience
258260 if not scope :
259261 scope = self .default_scopes
260262 post_data = {
261263 "client_id" : self .client_id ,
262264 "client_secret" : self .client_secret ,
263265 "grant_type" : "client_credentials" ,
264- "audience" : self . audience
266+ "audience" : audience
265267 }
266268 repsonse = self ._post (self .token_endpoint , data )
267269
You can’t perform that action at this time.
0 commit comments