Seeking Some Help with Mailsac API – Fetching Emails Issue!

Hey everyone,

I am trying to fetch emails using the Mailsac API., but I am running into some issues. I followed the documentation and used the /api/addresses/{email}/messages endpoint…, but I keep getting an empty response even though emails are visible in the Mailsac web UI.

Here’s my setup :-

  • I’m using Python with requests
  • API key is correctly set in the headers
  • The email address exists and has received test emails

Here’s my request code:

python

CopyEdit

import requests

api_key = "your_api_key"
email = "[email protected]"

url = f"https://mailsac.com/api/addresses/{email}/messages"
headers = {"Mailsac-Key": api_key}

response = requests.get(url, headers=headers)
print(response.json())

Am I missing any settings: ?? Do I need to mark the emails public or something: ?? Any help would be appreciated !!

Thanks in advance !!

With Regards,
DerekMendix

Hi Derek,

I copied and pasted your code into a python interpreter, substituting api_key and it worked as expected. Try your code with [email protected] and see what happens.

Let me know if that works for you,
Michael