API Endpoints

This endpoint returns the number of report credits and discovery requests left within a subscription plan.

Endpoint

GET https://hypeauditor.com/api/method/auditor.planInfo/

📘

Note:

  • Endpoint is available only for API subscriptions.

Response Object

AttributesTypeDescription
reports.planstringAPI reports subscription plan name
reports.creditsintegerNumber of report credits left
discovery.planstringAPI discovery subscription plan name
discovery.requestsintegerNumber of discovery requests left

Requests

Set YOUR_ID and YOUR_TOKEN from HypeAuditor.

curl -X GET \
 'https://hypeauditor.com/api/method/auditor.planInfo/'
-H 'accept: application/json' \
-H 'x-auth-id: %YOUR_ID%' \
-H 'x-auth-token: %YOUR_TOKEN%' \
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://hypeauditor.com/api/method/auditor.planInfo/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'accept: application/json',
    'x-auth-id: 1982319',
    'x-auth-token: $2y$04$jcjnECdGxtIBWs2bua0JnulqTMm3JRN4UaJe6.GwROr12oEUgnCv.'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Sample Response

{
    "result": {
        "reports": {
            "plan": "basic",
            "credits": 10123
        },
        "discovery": {
            "plan": "all",
            "requests": 89936
        }
    }
}

Errors

Please refer to Errors.

Error Examples

402: No access to API

{
    "error": {
        "code": 27,
        "description": "No API access"
    }
}

403: Invalid token (ID/API key)

{
    "error": {
        "code": 4,
        "description": "Invalid token"
    }
}