From 1dd064cdaffa5350d25cff79c4bb6c3dc542b940 Mon Sep 17 00:00:00 2001 From: SergioLangaritaBenitez <37197592+SergioLangaritaBenitez@users.noreply.github.com> Date: Mon, 26 Jan 2026 08:27:21 +0100 Subject: [PATCH] Use user token instead of service token in the invocation (#45) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * pagination option added * adapt fdl scipt path * absolute path posibility added * client_id as optional argument * client_id default value * Update readme * clean code and set default values * Updating versions/notes for 1.3.3-beta1 release * Updating versions/notes for 1.3.3-beta1 release * use token of the user instead of the service --------- Co-authored-by: Estíbaliz Parcero <5576714+esparig@users.noreply.github.com> --- oscar_python/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oscar_python/client.py b/oscar_python/client.py index 834ee45..c4786a4 100644 --- a/oscar_python/client.py +++ b/oscar_python/client.py @@ -198,6 +198,8 @@ def remove_service(self, name): return utils.make_request(self, _SVC_PATH+"/"+name, _DELETE) def _get_token(self, svc): + if self._AUTH_TYPE != 'basicauth': + return self.get_access_token() service = utils.make_request(self, _SVC_PATH+"/"+svc, _GET) service = json.loads(service.text) return service["token"]