The API was made incredibly simple to use from any language.
You should send a POST request to http://paste.ee/api
or https://paste.ee/api
with the following fields:
The API Endpoint determines whether the supplied like will be normal http or https.
A successful response will return data like this:
{
"paste":{
"id":"AbCDe",
"link":"http://paste.ee/p/AbCDe",
"raw":"http://paste.ee/r/AbCDe",
"download":"http://paste.ee/d/AbCDe",
"min":"http://min.paste.ee/d/AbCDe"
},
"status":"success"
}
<?xml version="1.0" encoding="UTF-8"?>
<response>
<status>success</status>
<paste>
<id>AbCDe</id>
<link>http://paste.ee/p/AbCDe</link>
<raw>http://paste.ee/r/AbCDe</raw>
<download>http://paste.ee/d/AbCDe</download>
<min>http://min.paste.ee/AbCDe</min>
</paste>
</response>
While a failed response will return data like this:
{
"errorcode":1,
"error":"no_key",
"status":"error"
}
<?xml version="1.0" encoding="UTF-8"?>
<response>
<status>error</status>
<errorcode>1</errorcode>
<error>error_no_key</error>
</response>
The errorcode
can be used in place of error
For the full list of error codes, see API:Errors