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=[email protected]&forwards=2&expire=2&cs=0¬ify=&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
Problem using API to create disposable email address
Re: Problem using API to create disposable email address
Please try to set the notify parameter to 0 or 1.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=[email protected]&forwards=2&expire=2&cs=0¬ify=&id=-1&website=
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
Stephan Ferraro
Founder of TrashMail.com
CEO of Aionda GmbH
Re: Problem using API to create disposable email address
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":"[email protected]","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
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":"[email protected]","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
Re: Problem using API to create disposable email address
Please try our shell API kit:
http://trashmail.net/files/trashmail_sdk_1_1.tar.gz
http://trashmail.net/files/trashmail_sdk_1_1.tar.gz
Best regards,
Stephan Ferraro
Founder of TrashMail.com
CEO of Aionda GmbH
Stephan Ferraro
Founder of TrashMail.com
CEO of Aionda GmbH
Who is online
Users browsing this forum: No registered users and 1 guest