Reseller API

Sell credits from your own panel

Connect DHRU Fusion, or call the API directly. Credits move instantly from your reseller balance to your customer's account.

API URLhttps://shadowauthtool.com/api/dhru
Portalhttps://shadowauthtool.com/reseller.html
FormatDHRU · form / XML / JSON

Sell Shadow Auth Tool credits from your own DHRU Fusion panel, or integrate directly from your own software. Credits move instantly from your reseller balance to your customer's account.

1Requirements

You needHow to get it
A reseller accountYour administrator creates it and gives you a username, a temporary password and an authenticator setup key (plus recovery codes).
A chosen passwordSign in at the portal with password + 6-digit authenticator code. You must replace the temporary password before anything else works.
An API keyPortal → API access → Create API key. Shown once.
A funded balanceAsk your administrator to add credits after payment. Every order deducts from this balance.
Strongly recommended: enter your DHRU server's IP address in Allowed IPs when creating the key. The key is then useless from any other address.

2Connect DHRU Fusion

Settings → API Providers → Add API Provider

FieldValue
Provider nameShadow Auth Tool
API URLhttps://shadowauthtool.com/api/dhru (if your panel asks for a site address only, enter https://shadowauthtool.com)
UsernameYour reseller username (the email on the account also works)
API keyThe key from the portal (no spaces)
API typeDHRU

Test the connection

Use Account Info / Balance. Expected result:

{"SUCCESS":[{"MESSAGE":"Account info retrieved successfully","Credit":"250.00",
 "AccoutInfo":{"mail":"you@example.com","username":"yourname","credit":"250.00","currency":"Credits"}}],
 "apiversion":"5.1"}

Credit is your available balance.

Import services

Click Sync Services. You will see one group, Credit top-up, with one service:

ServiceService IDCost to youQuantity
Credits1001.00 per credit1 – 500

The customer picks the quantity: an order for 25 costs you 25.00 and gives the customer 25 credits. Set your own selling price per credit in DHRU (for example 15 % margin → sell 1 credit for 1.15 in your currency). Panels that synced the older fixed packs (service IDs 200 – 50000) keep working; sync again to switch to the single service.

Each service asks for one custom field: Username or email of the customer's Shadow Auth Tool account.

How an order flows

  1. The customer orders credits, chooses the quantity and enters their username or email.
  2. DHRU calls placeimeiorder. The credits move immediately.
  3. The order is Success (status 4) with the text "10 credits were added to the account alice - check your account on https://shadowauthtool.com". Your panel shows this to the customer.

3Protocol reference

All calls: POST, form-encoded (JSON body also accepted).

FieldMeaning
usernameReseller username or email
apiaccesskeyYour API key
actionSee below
requestformatJSON
parametersXML or JSON, optionally base64-encoded

parameters can be sent as XML:

<PARAMETERS><ID>1000</ID><IMEI>alice</IMEI><REFERENCE>order-8841</REFERENCE></PARAMETERS>

or JSON {"ID":1000,"IMEI":"alice","REFERENCE":"order-8841"}. Direct integrations may instead send plain form fields (customer=alice&amount=5).

Success: {"SUCCESS":[{...}],"apiversion":"5.1"} Failure (HTTP 200): {"ERROR":[{"MESSAGE":"...","FULL_DESCRIPTION":"code"}],"apiversion":"5.1"}

Actions

ActionParametersReturns
accountinfo–Credit, AccoutInfo
imeiservicelist–the 1-credit service (quantity 1 – 500)
placeimeiorderID (service id), customer in IMEI, USERNAME, EMAIL or CUSTOMFIELD; optional REFERENCEREFERENCEID (order number)
getimeiorderID (order number)STATUS (4 = success), CODE
getimeiorderbulkIDS (comma separated, max 100)LIST of statuses
transfercustomer, amount (max 2 decimals), optional referenceREFERENCEID, AMOUNT, CREDIT (your balance after)
userinfocustomerUSERNAME, EMAIL, CREDIT, DISABLED
createuserusername, optional email, optional passwordUSERNAME, TEMPORARYPASSWORD if generated
listorders–your last 100 transfers

fileservicelist, providerlist, modellist and mepkeylist return empty lists so panel syncs don't fail.

Examples

# Balance
curl -s https://shadowauthtool.com/api/dhru \
  -d username=YOURNAME -d apiaccesskey=hurs_xxxxxxxx -d action=accountinfo

# Send 25 credits to a customer (safe to retry: same reference never charges twice)
curl -s https://shadowauthtool.com/api/dhru \
  -d username=YOURNAME -d apiaccesskey=hurs_xxxxxxxx \
  -d action=transfer -d customer=alice -d amount=25 -d reference=inv-2026-0042

# DHRU-style order for 10 credits (service 100, quantity 10)
curl -s https://shadowauthtool.com/api/dhru \
  -d username=YOURNAME -d apiaccesskey=hurs_xxxxxxxx -d action=placeimeiorder \
  --data-urlencode 'parameters=<PARAMETERS><ID>100</ID><QNT>10</QNT><IMEI>alice</IMEI><REFERENCE>order-8841</REFERENCE></PARAMETERS>'

Idempotency – important

Always send a REFERENCE/reference (your order id). Repeating a call with the same reference returns the original order and never charges again. Reusing a reference with a different customer or amount is rejected (reference_conflict). Without a reference a retried request is treated as a new order.

4Rules and limits

  • Customers are found by exact username or email. The customer does not need a verified email; the username is enough. Disabled, administrator and reseller accounts cannot receive credits; you cannot credit yourself.
  • Maximum per transfer: 1,000 credits (can be raised by your administrator).
  • Amounts have at most two decimals and must be positive.
  • Orders fail with insufficient_credits if your available balance is too low – nothing is deducted.
  • Rate limit: 240 requests / minute per IP. Ten failed authentications within five minutes block that IP for five minutes.
  • Up to 5 active API keys; accounts you create with createuser (up to 5,000) are marked as yours.

5Troubleshooting

Message / codeCause and fix
Authentication FailedWrong username/key, key revoked, spaces in the key, request not coming from the key's allowed IP, or reseller access removed.
Too many failed authentication attempts (HTTP 429)Wait five minutes, then fix the credentials.
password_change_requiredSign in to the portal and replace the temporary password.
insufficient_creditsBalance too low – ask your administrator to top up.
customer_not_foundThis customer account wasn't found. Usually a typo in the username or email; check it with the customer. Administrator and reseller accounts also give this answer.
customer_unavailableThe customer account is disabled.
amount_too_large / invalid_amountOver the per-transfer cap, zero/negative, or more than 2 decimals.
invalid_quantityThe quantity is not a whole number from 1 to 500.
reference_conflictReference already used for a different customer or amount.
Invalid service IDService ID is not the one above – re-sync services.
Services missing after syncCheck the URL is exactly https://shadowauthtool.com/api/dhru (and starts with https://), then sync again.
Balance in DHRU differs from portalPortal shows the same available credits; contact support with the response text (never your key).

6Security

  • Treat the API key like a password. Never put it in public code, customer-facing pages or support tickets.
  • Pin the key to your server's IP and revoke/recreate it if you suspect a leak (Portal → API access → Revoke).
  • Every transfer is recorded in an append-only ledger and visible in Recent transfers in the portal.
  • Reseller sign-in always requires your authenticator code; keep your recovery codes offline.