apiTON
HomeExplorerBlog
HomeExplorerBlog
Contact
  1. v2.SiteProxy
  • api:TON Documentation
  • v2.Nft
    • Username
      POST
    • Number
      POST
    • Domain
      POST
    • Gift
      POST
    • Item
      POST
    • Items
      POST
  • v2.Rate
    • Fiat rate
      POST
    • Crypto rate
      POST
    • Exchanges rate
      POST
    • Jetton prices
      POST
  • v2.Auth
    • Do
      POST
    • List
      POST
    • Import
      POST
    • Backup
      POST
    • Delete
      POST
    • New
      POST
  • v2.Wallet
    • Send TON
      POST
    • Send Jetton
      POST
    • Send Nft
      POST
  • v2.Address
    • Transactions
    • Details
    • Jettons
    • NFTs
    • Wallets
    • Collections
    • Run get-method
    • Address labels
  • v2.NftContract
    • Mint Nft Collection
    • Mint NFT
  • v2.JettonContract
    • Mint
    • Burn
    • Change owner
    • Close Mint
  • v2.Watch
    • Create watch
    • List watches
    • Delete watch
    • Poll events
    • Test watch
  • v2.SiteProxy
    • Site proxy offer
      POST
    • Check website and domain
      POST
    • Create site proxy order
      POST
    • Get site proxy order
      POST
    • Verify site proxy order
      POST
    • Stop site proxy order
      POST
    • List site proxy orders
      POST
  • Schemas
    • Schemas
      • Connect Error
      • google.protobuf.Any
      • NftDomainSite
      • ListValue
      • Message
      • NullValue
      • Struct
      • AddressGetMethod
      • FieldsEntry
      • DetailsResponse
      • AddressGetMethodArg
      • google.protobuf.Timestamp
      • DetailsRequest
      • AddressLabel
      • AddressLabelsRequest
      • google.protobuf.Value
      • AddressRunGetMethodRequest
      • AddressLabelsResponse
      • BlockID
      • AddressRunGetMethodResponse
      • BurnRequest
      • AddressStackEntry
      • BurnResponse
      • TransactionsResponse
      • ChangeAdminRequest
      • SiteProxyCheckRequest
      • ChangeAdminResponse
      • SiteProxyCheckResponse
      • CloseMintRequest
      • SiteProxyCreateRequest
      • CloseMintResponse
      • SiteProxyCreateResponse
      • DetailsAddress
      • SiteProxyGetRequest
      • DetailsRequest
      • SiteProxyGetResponse
      • DetailsResponse
      • SiteProxyListRequest
      • DomainRequest
      • SiteProxyListResponse
      • DomainResponse
      • SiteProxyOfferRequest
      • ItemRequest
      • SiteProxyOfferResponse
      • ItemResponse
      • SiteProxyOrder
      • Jetton
      • SiteProxyOwner
      • JettonDetails
      • SiteProxyPay
      • JettonsRequest
      • SiteProxyPayMessage
      • JettonsResponse
      • SiteProxyProblem
      • Message
      • SiteProxyRecord
      • MintCollectionRequest
      • SiteProxyRouteLimits
      • MintCollectionResponse
      • SiteProxyStopRequest
      • MintNftRequest
      • SiteProxyStopResponse
      • MintNftResponse
      • SiteProxyUsage
      • MintRequest
      • SiteProxyVerifyRequest
      • MintResponse
      • SiteProxyVerifyResponse
      • NftItem
      • SiteProxyWebProof
      • NftsRequest
      • NftsResponse
      • NumberRequest
      • NumberResponse
      • RateCryptoRequest
      • RateCryptoResponse
      • ResultEntry
      • RateExchangesRequest
      • RateExchangesResponse
      • ResultEntry
      • RateFiatRequest
      • RateFiatResponse
      • ResultEntry
      • SendJettonRequest
      • SendJettonResponse
      • SendNftRequest
      • SendNftResponse
      • SendRequest
      • SendResponse
      • TeleAuction
      • TeleAuctionConfig
      • TeleAuctionLastBid
      • TeleSale
      • Transaction
      • TransactionsRequest
      • TransactionsResponse
      • UsernameRequest
      • UsernameResponse
      • Version
      • WalletAuth
      • WalletAuth4
      • WalletDetails
      • WalletNewRequest
      • WalletNewResponse
      • WalletsRequest
      • WalletsResponse
      • AddressCollection
      • AddressCollectionsRequest
      • AddressCollectionsResponse
      • AuthBackupRequest
      • AuthDeleteRequest
      • AuthDeleteResponse
      • AuthDoRequest
      • AuthImportRequest
      • AuthJwtResponse
      • AuthListRequest
      • AuthListResponse
      • AuthNewRequest
      • BlockID
      • BurnRequest
      • BurnResponse
      • ChangeAdminRequest
      • ChangeAdminResponse
      • CloseMintRequest
      • CloseMintResponse
      • DetailsAddress
      • DomainRequest
      • DomainResponse
      • GiftAttribute
      • GiftRequest
      • GiftResponse
      • ItemRequest
      • ItemResponse
      • Jetton
      • JettonDetails
      • JettonsRequest
      • JettonsResponse
      • MintCollectionRequest
      • MintCollectionResponse
      • MintNftRequest
      • MintNftResponse
      • MintRequest
      • MintResponse
      • NftItem
      • NftItemsRequest
      • NftsRequest
      • NftsResponse
      • NumberRequest
      • NumberResponse
      • RateCryptoRequest
      • RateCryptoResponse
      • RateExchangesRequest
      • RateExchangesResponse
      • RateFiatRequest
      • RateFiatResponse
      • RateJettonPricesRequest
      • RateJettonPricesResponse
      • SendJettonRequest
      • SendJettonResponse
      • SendNftRequest
      • SendNftResponse
      • SendRequest
      • SendResponse
      • TeleAuction
      • TeleAuctionConfig
      • TeleAuctionLastBid
      • TeleSale
      • Transaction
      • TransactionsRequest
      • UsernameRequest
      • UsernameResponse
      • Version
      • WalletAuth
      • WalletDetails
      • WalletInfo
      • WalletsRequest
      • WalletsResponse
    • WatchCreateRequest
    • WatchCreateResponse
    • WatchDeleteRequest
    • WatchDeleteResponse
    • WatchEvent
    • WatchLimits
    • WatchListRequest
    • WatchListResponse
    • WatchPollRequest
    • WatchPollResponse
    • WatchSubscription
    • WatchTestRequest
    • WatchTestResponse
    • WatchTx
    • WatchWebhook
  1. v2.SiteProxy

Verify site proxy order

POST
/v2.SiteProxy/Verify
Checks the web proof and the domain's site record now and answers the order. One check per order per 30 seconds: asking more often answers the last result (web_proof.next_verify_at says when the next check can run).
curl -X POST https://app.apiton.org/v2.SiteProxy/Verify -H 'Content-Type: application/json' -d '{"id":"7k3qx9zd2m"}'
On failure web_proof.last_error says what was found: file: status 404; txt: not found, redirect (not followed), other content, file: upstream_challenge (…); txt: not found. The first success reads your home page once and checks it against the restricted class: a match makes the order blocked (restricted:<class>) before any payment; a page that cannot be read (the site down, a timeout, an ordinary 403 / 503) is no refusal.
A home page that Cloudflare answers with its challenge or block page keeps the order draft: the customer node asks from the same address and would serve that page to every visitor. web_proof.last_error then has both results — txt: ok; home page: upstream_challenge (…) (or file: ok; …) — and each Verify (still one per 30 s) reads the home page again until it comes through; then the order is ready_to_pay as usual.
upstream_challenge — the website is behind Cloudflare, and Cloudflare answered apiton's request with its challenge or block page instead of the file (the header cf-mitigated: challenge, or a 403 / 503 from server: cloudflare carrying Cloudflare's challenge or block page; the website's own 403 / 503 stays status 403 / status 503). Every request apiton makes to your website — the checks (User-Agent: apiton-verify/1 (+https://apiton.org/sites/proxy/)) and every page of the .ton site (the node passes on the visitor's own User-Agent) — comes from 185.217.124.43: allow that address (an IP Access rule with the action Allow) and keep Bot Fight Mode, I'm Under Attack, challenge rules and Cloudflare Access away from it. The TXT record proves the website with no request, but the pages are still fetched from that address. Guide: your website behind Cloudflare.
Errors: failed_precondition (400) — an id that is not 10 letters and digits · not_found (404) — no such order · unavailable (503).

Request

Body Params application/jsonRequired

Example
{
    "id": "7k3qx9zd2m"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://app.apiton.org/v2.SiteProxy/Verify' \
--header 'Content-Type: application/json' \
--data '{
    "id": "7k3qx9zd2m"
}'

Responses

🟢200OK
application/json
Bodyapplication/json

Example
{
    "order": {
        "id": "string",
        "domain": "string",
        "host": "string",
        "root_path": "string",
        "status": "string",
        "status_reason": "string",
        "created_at": "2019-08-24T14:15:22.123Z",
        "web_proof": {
            "token": "string",
            "value": "string",
            "file_url": "string",
            "txt_name": "string",
            "method": "string",
            "verified_at": "2019-08-24T14:15:22.123Z",
            "checked_at": "2019-08-24T14:15:22.123Z",
            "last_error": "string",
            "fails": 0,
            "next_verify_at": "2019-08-24T14:15:22.123Z"
        },
        "record": {
            "kind": "string",
            "address": "string",
            "points_to_us": true,
            "checked_at": "2019-08-24T14:15:22.123Z"
        },
        "owner": {
            "address": "string",
            "state": "string",
            "checked_at": "2019-08-24T14:15:22.123Z"
        },
        "pay": {
            "periods": 0,
            "amount_nano": "string",
            "first": true,
            "messages": [
                {
                    "kind": "string",
                    "address": "string",
                    "amount_nano": "string",
                    "payload_b64": "string",
                    "comment": "string"
                }
            ],
            "comment": "string",
            "pay_address": "string",
            "ton_link": "string",
            "tonkeeper_link": "string"
        },
        "paid_at": "2019-08-24T14:15:22.123Z",
        "paid_until": "2019-08-24T14:15:22.123Z",
        "activated_at": "2019-08-24T14:15:22.123Z",
        "closed_at": "2019-08-24T14:15:22.123Z",
        "usage": {
            "bytes": "string",
            "requests": "string",
            "quota_bytes": "string",
            "since": "2019-08-24T14:15:22.123Z",
            "over_quota": true
        },
        "ton_url": "string",
        "kind": "string"
    }
}
🔴500Server Error
Previous
Get site proxy order
Next
Stop site proxy order
Built with