From 81c9c7983292d5db69d29760f46c6f7c1694e208 Mon Sep 17 00:00:00 2001 From: Aditya <60684641+0x0elliot@users.noreply.github.com> Date: Tue, 14 Jul 2026 17:25:50 +0530 Subject: [PATCH 1/4] feat: use regional url for send_sms and send_email --- shuffle-tools/1.2.0/src/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shuffle-tools/1.2.0/src/app.py b/shuffle-tools/1.2.0/src/app.py index c715810a..17212a83 100644 --- a/shuffle-tools/1.2.0/src/app.py +++ b/shuffle-tools/1.2.0/src/app.py @@ -191,7 +191,7 @@ def send_sms_shuffle(self, apikey, phone_numbers, body): data = {"numbers": targets, "body": body} - url = "https://shuffler.io/api/v1/functions/sendsms" + url = "%s/api/v1/functions/sendsms" % self.url headers = {"Authorization": "Bearer %s" % apikey} return requests.post(url, headers=headers, json=data, verify=False).text @@ -226,7 +226,7 @@ def send_email_shuffle(self, apikey, recipients, subject, body, attachments=""): except Exception as e: pass - url = "https://shuffler.io/functions/sendmail" + url = "%s/functions/sendmail" % self.url headers = {"Authorization": "Bearer %s" % apikey} return requests.post(url, headers=headers, json=data).text From d34b0540d5b9ade31e3003a7257f37eb6e0bfac3 Mon Sep 17 00:00:00 2001 From: Aditya <60684641+0x0elliot@users.noreply.github.com> Date: Tue, 14 Jul 2026 17:40:12 +0530 Subject: [PATCH 2/4] feat: fallback to shuffler.io if url is not regional --- shuffle-tools/1.2.0/src/app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shuffle-tools/1.2.0/src/app.py b/shuffle-tools/1.2.0/src/app.py index 17212a83..a8baad0a 100644 --- a/shuffle-tools/1.2.0/src/app.py +++ b/shuffle-tools/1.2.0/src/app.py @@ -191,7 +191,8 @@ def send_sms_shuffle(self, apikey, phone_numbers, body): data = {"numbers": targets, "body": body} - url = "%s/api/v1/functions/sendsms" % self.url + base = self.url if "shuffler.io" in self.url or "run.app" in self.url else "https://shuffler.io" + url = "%s/api/v1/functions/sendsms" % base headers = {"Authorization": "Bearer %s" % apikey} return requests.post(url, headers=headers, json=data, verify=False).text @@ -226,7 +227,8 @@ def send_email_shuffle(self, apikey, recipients, subject, body, attachments=""): except Exception as e: pass - url = "%s/functions/sendmail" % self.url + base = self.url if "shuffler.io" in self.url or "run.app" in self.url else "https://shuffler.io" + url = "%s/functions/sendmail" % base headers = {"Authorization": "Bearer %s" % apikey} return requests.post(url, headers=headers, json=data).text From 2ad4bc444723a2871cab8b4fd8b849d1575e7f22 Mon Sep 17 00:00:00 2001 From: Aditya <60684641+0x0elliot@users.noreply.github.com> Date: Tue, 14 Jul 2026 17:43:51 +0530 Subject: [PATCH 3/4] feat: simplify regional url check to shuffler.io only --- shuffle-tools/1.2.0/src/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shuffle-tools/1.2.0/src/app.py b/shuffle-tools/1.2.0/src/app.py index a8baad0a..41e62fbd 100644 --- a/shuffle-tools/1.2.0/src/app.py +++ b/shuffle-tools/1.2.0/src/app.py @@ -191,7 +191,7 @@ def send_sms_shuffle(self, apikey, phone_numbers, body): data = {"numbers": targets, "body": body} - base = self.url if "shuffler.io" in self.url or "run.app" in self.url else "https://shuffler.io" + base = self.url if "shuffler.io" in self.url else "https://shuffler.io" url = "%s/api/v1/functions/sendsms" % base headers = {"Authorization": "Bearer %s" % apikey} return requests.post(url, headers=headers, json=data, verify=False).text @@ -227,7 +227,7 @@ def send_email_shuffle(self, apikey, recipients, subject, body, attachments=""): except Exception as e: pass - base = self.url if "shuffler.io" in self.url or "run.app" in self.url else "https://shuffler.io" + base = self.url if "shuffler.io" in self.url else "https://shuffler.io" url = "%s/functions/sendmail" % base headers = {"Authorization": "Bearer %s" % apikey} return requests.post(url, headers=headers, json=data).text From 37f7ec82a61e4214df127ded497333e12222c3d2 Mon Sep 17 00:00:00 2001 From: Aditya <60684641+0x0elliot@users.noreply.github.com> Date: Tue, 14 Jul 2026 17:52:03 +0530 Subject: [PATCH 4/4] feat: use regional url for send_sms and send_email with onprem fallback --- shuffle-tools/1.2.0/src/app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shuffle-tools/1.2.0/src/app.py b/shuffle-tools/1.2.0/src/app.py index 41e62fbd..9423a3a4 100644 --- a/shuffle-tools/1.2.0/src/app.py +++ b/shuffle-tools/1.2.0/src/app.py @@ -191,7 +191,8 @@ def send_sms_shuffle(self, apikey, phone_numbers, body): data = {"numbers": targets, "body": body} - base = self.url if "shuffler.io" in self.url else "https://shuffler.io" + # this is just to expose this feature to onprem users as well + base = self.url if "shuffler.io" in self.url or "run.app" in self.url else "https://shuffler.io" url = "%s/api/v1/functions/sendsms" % base headers = {"Authorization": "Bearer %s" % apikey} return requests.post(url, headers=headers, json=data, verify=False).text @@ -227,7 +228,8 @@ def send_email_shuffle(self, apikey, recipients, subject, body, attachments=""): except Exception as e: pass - base = self.url if "shuffler.io" in self.url else "https://shuffler.io" + # this is just to expose this feature to onprem users as well + base = self.url if "shuffler.io" in self.url or "run.app" in self.url else "https://shuffler.io" url = "%s/functions/sendmail" % base headers = {"Authorization": "Bearer %s" % apikey} return requests.post(url, headers=headers, json=data).text