Choosing Email Domains, Reordering and History in the OtpGet Email API
Buying a temporary email is easy. Buying the right one is where experience matters. Some services accept every domain, some quietly reject certain ones. That is why the OtpGet Email API lets you choose.
getEmailDomains
https://otpget.com/stubs/email-handler.php?api_key=YOUR_API_KEY&action=getEmailDomains
Returns every domain available for purchase. Pass your chosen domain when you call buyEmail. If one domain is rejected by a service, simply try another one; you are not locked in.
Picking a domain
- Start with the domain that worked last time for the same service.
- If the service says the address is invalid, switch domain and retry.
- Cancel unused orders so you are refunded and your history stays tidy.
reorderEmail
Some services send a second message later, such as a login code after the sign-up code. reorderEmail lets you order the same address again so the next message is delivered to you too, without creating a fresh account.
getEmailHistory
https://otpget.com/stubs/email-handler.php?api_key=YOUR_API_KEY&action=getEmailHistory
Returns your past email orders with their status. Use it to reconcile your own database, show customers their previous purchases, or investigate a missing code.
Reconciliation checklist
- Store the order id of every email you buy.
- Once a day, compare your records with
getEmailHistory. - Investigate orders that stay pending for a long time and cancel them.
Start building with OtpGet
Create a free account at otpget.com, copy your API key from the dashboard and open the API documentation. Our support team is available 24/7 if you get stuck.