Sabina_Chess / scratch /test_api.py
SabinaRosie
Switch to Brevo HTTP API for email delivery (SMTP blocked on HF Spaces)
77fe54c
Raw
History Blame Contribute Delete
488 Bytes
import requests
import json
BASE_URL = "http://127.0.0.1:8001/api"
def test_forgot_password():
email = "niraulasabina08@gmail.com"
print(f"Testing /forgot-password with {email}...")
try:
response = requests.post(f"{BASE_URL}/forgot-password", json={"email": email})
print(f"Status: {response.status_code}")
print(f"Body: {response.text}")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
test_forgot_password()