Problem using API to create disposable email address

Bug reports about this site.
Post Reply
timbo
Posts: 2
Joined: 19 Mar 2012, 15:38

Problem using API to create disposable email address

Post by timbo » 19 Mar 2012, 15:48

I'm trying to use the API to programmatically create a new disposable email address but I always get "Error 6 = Missing parameters".

I am sending a POST to this URL:
https://ssl.trashmail.net/?api=1&lang=en&cmd=create_dea

The POST data is:
disposable_name=mynewemail&disposable_domain=trashmail.net&destination=myname@mydomain.com&forwards=2&expire=2&cs=0&notify=&id=-1&website=

The response I get is
{"success":false, "error_code":6, "msg":"Missing Parameters."}

Prior to sending this request, I send a login request which is successful, and I include the returned cookie with the subsequent requests. I have read the API v3.0 carefully and I believe I am sending all the right parameters. I also enabled debug mode 2 on Trashmail's Firefox plug-in, and used the Error Console to view what the plug-in sends when it creates an email address, and as far as I can see, I am sending the same data that it is. The plug in works fine, but not my program.

Any help would be much appreciated.

Regards,
Tim

Admin
Site Admin
Posts: 1243
Joined: 16 Jun 2006, 08:55
Location: Germany
Contact:

Re: Problem using API to create disposable email address

Post by Admin » 20 Mar 2012, 11:17

timbo wrote:I'm trying to use the API to programmatically create a new disposable email address but I always get "Error 6 = Missing parameters".

I am sending a POST to this URL:
https://ssl.trashmail.net/?api=1&lang=en&cmd=create_dea

The POST data is:
disposable_name=mynewemail&disposable_domain=trashmail.net&destination=myname@mydomain.com&forwards=2&expire=2&cs=0&notify=&id=-1&website=
Please try to set the notify parameter to 0 or 1.
I will try to write a small shell script with curl commands for Linux/UNIX systems (or Cygwin on Windows) to understand and debug better the API.
Best regards,
Stephan Ferraro
Founder of TrashMail.com
CEO of Aionda GmbH

timbo
Posts: 2
Joined: 19 Mar 2012, 15:38

Re: Problem using API to create disposable email address

Post by timbo » 19 Oct 2012, 16:39

Sorry for the long delay in replying (6 months!) I am just getting back around to this project.

Here is the URL I'm sending to:
https://ssl.trashmail.net/?api=1&lang=en&cmd=create_dea

Here are the cookies I send (which I received after logging in)
trashmail_session=j9cjcsvv7umpejiiqsnj3upst1
trashmail_manager_login=timbo

Here is the POST data I send when trying to create a new address:
{"data":{"id":-1,"disposable_name":"timzxzxzx","disposable_domain":"objectmail.com","destination":"myemail@mydomain.com","forwards":2,"expire":31,"website":"","cs":0,"notify":1}}

Can you try and help me determine why I keep getting the Missing Parameters error?
{"success":false,"error_code":6,"msg":"Missing parameters."}

Thanks,
Tim

Admin
Site Admin
Posts: 1243
Joined: 16 Jun 2006, 08:55
Location: Germany
Contact:

Re: Problem using API to create disposable email address

Post by Admin » 22 Oct 2012, 16:25

Best regards,
Stephan Ferraro
Founder of TrashMail.com
CEO of Aionda GmbH

Post Reply