Open The Door

Sign in  Sign up








Bookmark Button

You can easily submit websites to OTD.to

Just copy the following HTML-Code to your Website. After that you can submit a Door by clicking the Bookmark Button.

otd.to

OExchange

OExchange is a simple specification for URL-based content sharing on the web.

OExchange makes it possible to share any URL-based content with any service on the web. For more information about OExchange please visit the public website, which contains the spec, guides, tools, just about everything. You can alltought visit the OExchange Google Group.

Where to find?

The /.well-known/host-meta resource is an XRD document that describes services available on the host, and is available via simple HTTP request. It include a reference to the target XRD for otd.to

host-meta XRD

<?xml version='1.0' encoding='UTF-8'?>
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0' xmlns:hm='http://host-meta.net/xrd/1.0'>
  <hm:Host>www.otd.to</hm:Host>
  <Link 
    rel='http://oexchange.org/spec/0.8/rel/resident-target' 
    type='application/xrd+xml' href='https://xrd.otd.to/otdto.xrd' >
  </Link>
</XRD>


API Status: active

You can use our API through a series of POST variables:

List

The list function will return a category  list for OTD website, as well as ID numbers for each category. These ID numbers will be needed when you go to use the Post function.

Arguments

&username={USERNAME}
&password={PASSWORD}
(required) the username of a member account.
(required) the password of a member account.



Example URL: https://otd.to/3rdparty/API/api.php?fn=list&username=demouser&password=demopass

Login

The login function is useful if you want to check if the account credentials provided are valid. When the username and password provided are correct it will return a unique user ID number. On failure it will return a zero (0).

Arguments

&username={USERNAME}
&password={PASSWORD}
(required) the username of a member account.
(required) the password of a member account.




Example URL: https://otd.to/3rdparty/API/api.php?fn=login&username=demouser&password=demopass

Ping

Ping is one of the simplest function provided because it doesn’t have any arguments. It will return a response of “Active” to indicate that the site is online and the API is enabled.

Example URL: https://otd.to/3rdparty/API/api.php?fn=ping

Post

The post function is the most complicated because it has so many variables. It is also the most useful because it can be used to submit stories to OTD from a third party website by submitting a simple POST form.

Arguments

&username={USERNAME}
&password={PASSWORD}
&url={URL}

&category={CATEGORY_ID_#}

&title={TITLE}
&content={CONTENT}
&tags={TAGS}
(required) the username of a member account.
(required) the password of a member account.
(required) the url associated with the door that you are submitting. This is what you typically put in the first submit step on OTD website.
(required) the ID number for the category that you are submitting to. To retrieve the category ID see the 'List' function above.
(required) the title of door being submitted.
(required) the content for the door being submitted.
(required) tags for the door separated by commas ( , )











Example URL: https://otd.to/3rdparty/API/api.php?fn=post&username=demouser&password=demopass&url=http://google.com&category=1&title=Hello World&content=Door Description&tags=tag1,tag2


On Success: Submit complete!
On Failure: Duplicate Door!!!

Version

The version function is used to return the OTD API version number. A successful response will be a number, often with a decimal place.

Example URL: https://otd.to/3rdparty/API/api.php?fn=version