Skip to content

Commit 7c01533

Browse files
author
Kevin Hannegan
committed
enable client_credentials mode
1 parent 7436dbd commit 7c01533

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

presalytics/client/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ def __init__(
225225
if token:
226226
self.username = None
227227
else:
228-
raise presalytics.lib.exceptions.MissingConfigException("Configuration variable PRESALYTICS_USERNAME is required when client is not initalized with an API token. Please reconfigure and retry.")
228+
if not client_secret:
229+
raise presalytics.lib.exceptions.MissingConfigException("when not passing tokens directly, a clien must have either a client_secrect or a username")
229230
try:
230231
if password:
231232
self.password = password

0 commit comments

Comments
 (0)