Close it
Close it

Documentation

Overview

Currently we support two method, Check and Sanitize. Check method is used when you only want to check is the submitted text are clean or not. Sanitize method is used when you want to sanitize your submitted text with replaced character.

With our simple REST API, you can easily to configure :

  • The REQUIRED parameter api_key is used to authenticate your call. If you don't have a license key you can get free with limit call per month or contact sales for large call per month.
  • The REQUIRED parameter text is the string you would like to moderate, don't forget to encode this as url encode.

Check Method

We highly recommend you to use this method for fast processing time and accuracy

			http://green.tandif.com/api/v1/text/check?api_key=your_api_key_here&text=your_text_here

Parameter

api_key(required)

Your API_KEY. you can grab from tandif dashboard.

text(required)

the text that you want to moderated/filtered by tandif.

 

Example call

		http://green.tandif.com/api/v1/text/check?api_key=xxxxxxxx&text=fuck my ass and my dick

Result

		{
			"result": "dirty"
		}

Error Codes

  • 400 : You didn't provide a required parameter
  • 401 : You provided an invalid/expire api key
  • 401 : You reach your api call this month

Sanitize Method

Still Beta, We not recommend you to use this method, Please use Check method for fast processing time and accuracy

			http://green.tandif.com/api/v1/text/sanitize?api_key=your_api_key_here&text=your_text_here&replacement=***

Parameter

api_key(required)

Your API_KEY. you can grab from tandif dashboard.

text(required)

the text that you want to moderated/filtered by tandif.

replacement(optional)

default = ***. This is the character that tandif will replace(sanitize) a detected word or domain. if don't set this parameter, tandif will automatic set to ***

Example Call

		http://green.tandif.com/api/v1/text/sanitize?api_key=xxxxxxxx&text=fuck my ass and my dick&replacement=***

Result

		{
			"result": "*** my *** and my ***"
		}

Error Codes

  • 400 : You didn't provide a required parameter
  • 401 : You provided an invalid/expire api key
  • 401 : You reach your api call this month

Code Example

PHP

		$api_key = 'your_api_key';
		$text = 'your text here';
		$fullPath = "http://green.tandif.com/api/v1/text/check?api_key=$api_key&text=".urlencode($text);
		$content = @file_get_contents($fullPath);
		if($content!==FALSE){
			$result = json_decode($content, true);
			echo $result['result'];
		} else {
		echo 'check you internet connection';
		}

Language Support

Currently Tandif support English and Indonesia. soon our team will add more language support. You can activate language support for you License from tandif dashboard.

copyright © tandif.com 2011 - all right reserved