AUTHENTICATION
Public access is enabled. No API key is required for requests.
API ENDPOINTS
GET
https://mytempmail.org/api_v1.php?action=random
Generate a new random email address ready to receive messages.
GET
https://mytempmail.org/api_v1.php?action=inbox&[email protected]&page=1&q=&html=0
Fetch inbox messages with pagination (page), search filter (q), and optional html=0 to omit raw HTML.
GET
https://mytempmail.org/api_v1.php?action=latest&[email protected]
Return only the newest incoming email for the specified address.
GET
https://mytempmail.org/api_v1.php?action=otp&[email protected]
Automatically extract a 4–8 digit verification code (OTP) from the latest email.
LIVE API TESTER
// JSON response will appear here...
INTEGRATION EXAMPLES
import time, requests
API_URL = "https://mytempmail.org/api_v1.php"
API_KEY = "" # Leave empty if public
def api_get(params):
if API_KEY:
params["key"] = API_KEY
return requests.get(API_URL, params=params, timeout=15).json()
# 1. Create a random temporary email
res = api_get({"action": "random"})
email = res["email"]
print("Created email:", email)
# 2. Poll until OTP arrives
for _ in range(20):
otp_res = api_get({"action": "otp", "email": email})
if otp_res.get("found"):
print("OTP Code:", otp_res["code"], "| From:", otp_res["sender"])
break
time.sleep(3)