User Tools

Site Tools


Sidebar

developers:remote_api:start

This is an old revision of the document!


Remote API

This section should help a 3rd party developer understand how the remote API system works. If you have any questions that are not answered here, feel free to send an e-mail to [email protected] and we would be happy to address any specific questions you might have.

Remote API Calls

You interact with the Remote API by making a remote API call. There are different types of calls that do different things, for instance anything related to use sessions, would start with "session.".

Here is a run down of all the current Geo API calls that are built into the main software, and a brief summary of what they are used for:

Remote API call Sample file Description
misc.echo _samples/misc.echo_client.php Returns whatever variables you send it, useful for testing to make sure you are able to communicate with the remote API
session.init _samples/session.init_client.php Create or edit a session, and return the session ID, that you would then use to set a cookie "classified_session", assuming you are on the same domain name. Allows sending username/[plaintext pass OR user token] to log a user in.
session.touch _samples/session.touch_client.php Update the "last active" time for a particular session.
session.destroy _samples/session.destroy_client.php Removes a particular session. In other words, log a user out based on the session ID.
user.register _samples/user.register_client.php Register a new user. Note that the normal checks are still done (with the exception of the security image), and that registration "fields to use" still apply here, if you attempt to register and break the "fields to use" rules, an error will be returned.
user.edit _samples/user.edit_client.php Edits a user's information, such as their e-mail, first/last name, etc. Note that the registration "fields to use" still apply here, if you attempt to edit something and break the "fields to use" rules, an error will be returned.
user.exists _samples/user.exists_client.php Check to see if a username or e-mail exists or not.
user.getToken _samples/user.getToken_client.php Gets a user's remote API token that can then be used in other remote API calls, such as user.edit.

Calls added by Addons

Note that you can create a new API call, inside of an addon. As long as that addon is installed and enabled, you will be able to use the API call.

Before creating a new remote API call yourself, if it makes sense for the API call to be one of the built-in calls (for instance, an API call to get the listing data for a particular listing), but is just not yet created, contact us as [email protected] to request it. Every single remote API call that is currently in existance, has been created because it is "in demand" (just like most of the current "addon hooks").

To create your own remote API call in your custom addon, create a sub-directory named "api" inside of the addon's directory. Then you would create a PHP file for any API call you want to make. Any files that are prepended with an underscore "_" will be ignored by the system. We recommend starting from the misc.echo remote API call and building on top of that. You can also see the Example Addon for more information about creating a new remote API call.

See Also

  • Remote API Security Keys - Page that shows the Remote API security keys for every single API call, something you will need when making an API call. See any of the sample remote API clients in classes/api/_samples/ for more info.
developers/remote_api/start.1230595177.txt.gz · Last modified: 2014/09/25 16:55 (external edit)