DFairPlay Query-Server API

The dfairplay main servers, have a http-GET-based query system, which can be used by servers to check for unfair players. <!--more--> This article is pretty technically, because it's about the API.

If you want to access the API directly (without using one of the interfaces, like e.g.

filterscript for samp servers) you will have to query the following url:


this is the root, and should be prepended to all following examples.

All calls are made in the following scheme:


In the following documentation I'll use some wildcards:

  • %token% The token received by a previous create_session call.
  • %game% The game the server is for, currently it can be only "gtasa-samp".

Free functions (no token required):

  • /create_session/%game%/ Retruns a string, the token of the session. This token must be renewed after at least 300 seconds by any call requiring it, or by using the ping-function.
  • /is_alive/ Returns 1. Is just for checking if the server is there and working :).

Restricted functions (token required):

  • /ping/%token%/ Refreshs a timeout for a session. Retruns 1.
  • /destroy_session/%token%/ Destroys a session. Retruns 1 on success else 0.
  • /add_user/%token%/id/ip/ Adds a user with the corrosponding id (on the samp server) and her ip to the server. Influcens the result of the get_incidents function. Retruns 1 if the user is using dfairplay or 0 if she does not!
  • /delete_user/%token%/id/ Removes a player from the servers session. Retruns 1 on success else 0.
  • /delete_user/%token%/id/ Removes a player from the servers session. Retruns 1 on success else 0.
  • /get_incidents/%token%/ Returns a ","-seperated list of player-ids (on the samp server), which have matching incidents.

Usage You'll mostly find your self using adduser to check if the player has dfairplay installed and deleteuser to remove it. If you do that on every connect/disconnect you can safely use get_incidents to find all players which have reported incidents while dfairplay installed!


All functions may return these error codes:

 1 = true
 0 = false
-1 = function not found
-2 = incorrect parameter count
-3 = invalid parameter
-4 = session expired 

In api, dfairplay by @ 07 Apr 2009

comments powered by Disqus

Recent Files


Recent Dev-Articles

Read recently