Anura Docs

Direct Integration - Endpoint

Direct result values may be obtained by calling the endpoint directly.

Method URL Note
GET, POST https://direct.anura.io/direct.json HTTPS recommended

Example Request

PHP
<?php
// define parameters
$params = array();
$params["instance"] = yourAssignedInstanceId;
// $params["source"] = "optionalSourceTrackingId";
// $params["campaign"] = "optionalCampaignTrackingId";
$params["ip"] = "visitorIPAddress";
// $params["ua"] = "optionalVisitorUserAgentString";
// $params["app"] = "optionalVisitorAppIDString";
// $params["device"] = "optionalVisitorDeviceIDString";
// $params["additional"] = "optionalAdditionalData";
// setup and initialize curl
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://direct.anura.io/direct.json?".http_build_query($params));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// perform the request
$response = curl_exec($curl);
// close the curl connection
curl_close($curl);
// continue with your custom result handler...
?>

Parameters

Required Type Description Note
instance integer Your instance ID.
ip string The IP address of your visitor. IPV6 addresses are also supported.
Optional Type Description Note
source string A variable, declared by you, to identify "source" traffic within Anura's dashboard interface.
campaign string A subset variable of "source," declared by you, to identify "campaign" traffic within Anura's dashboard interface.
ua string The user agent string of your visitor. Do not modify the user agent string of your visitor. Modifications to the user agent string may cause adverse results.
app string The application package identifier of your visitor (when available.) Also referred to as: app ID, bundle ID, package name, etc.
device string The device identifier of your visitor (when available.)
additional string An array of Additional Data declared as a JSON encoded string. Read more about using Additional Data.

Source and campaign parameters are limited to a maximum of 128 characters.

Source and campaign parameters may not equal the following values: "all sources", "all campaigns", "&", "*", "?", "%".

Security

Anura Direct offers an optional "IP address locking" feature to protect against unauthorized use of your instance ID. Once enabled, requests will only be accepted from client authorized IP addresses. Please talk to support about enabling the direct IP address locking feature.

Example Response

{
    "result": "suspect",
    "mobile": null,
    "rule_sets": [
        "IP"
    ],
    "invalid_traffic_type": "GIVT"
}

Result Values

Result Description
suspect Based on available data, we have determined the visitor to be suspect.
non-suspect Based on available data, we have determined the visitor to be non-suspect.

Please refer to our direct result definitions documentation for more information on these values.

Rule Set Values

Result Description
UE User Environment
DC Data Center
IP IP Integrity
WC Web Crawler

The "rule_sets" array requires "return rule sets" to be enabled. Talk to support about enabling or disabling the return rule sets feature.

The "invalid_traffic_type" string requires "return invalid traffic type" to be enabled. Talk to support about enabling or disabling the return invalid traffic type feature.

Please refer to our rule set definitions documentation for more information on these values.