update sms api for smspipe
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 9s

This commit is contained in:
2026-08-02 06:04:20 +05:00
parent c414116ed5
commit 2db0369d7c
2 changed files with 21 additions and 12 deletions
+5 -4
View File
@@ -232,14 +232,15 @@ def send_sms_with_callback_token(user, mobile_token, **kwargs):
logger.debug("Failed to send SMS. Missing SMS_API_URL or SMS_API_KEY.")
return False
from api.notifications import format_mobile
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {api_key}",
"X-API-Key": api_key,
}
data = {
"number": to_number,
"message": base_string % mobile_token.key,
"check_delivery": False,
"to": format_mobile(to_number),
"text": base_string % mobile_token.key,
}
print(mobile_token.key)
response = requests.post(api_url, headers=headers, data=json.dumps(data))