vlayer docs
Examples

Binance Example

Under Development: This API is currently in development. Documentation and endpoints may change.

End-to-End Web Proof Workflow

This example demonstrates the complete workflow of generating and verifying a Web Proof using the Web Prover Server.

Step 1: Generate a Web Proof

First, generate a Web Proof for an API call:

curl -X POST https://web-prover.production.vlayer.xyz/api/v2.0 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ak_ESW9RZSNVBEQ728R8PJBPR80E6EFA9QX" \
  -d '{
    "url": "https://data-api.binance.vision/api/v3/exchangeInfo?symbol=ETHUSDC",
    "headers": []
  }'
const response = await fetch('https://web-prover.production.vlayer.xyz/api/v2.0', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer ak_ESW9RZSNVBEQ728R8PJBPR80E6EFA9QX'
  },
  body: JSON.stringify({
    url: 'https://data-api.binance.vision/api/v3/exchangeInfo?symbol=ETHUSDC',
    headers: []
  })
});

const presentation = await response.json();
console.log(JSON.stringify({
  ...presentation,
  data: presentation.data.substring(0, 100) + '...'
}, null, 2));

The included credentials are for limited public use. For production use, please contact our team.

Response:

{
  "apiVersion": "v2.0",
  "data": {
    "data": "014000000000...",
    "meta": {
      "notaryUrl": "https://notary.vlayer.xyz/v0.1.0-alpha.12"
    },
    "version": "0.1.0-alpha.12"
  },
  "success": true,
  "traceId": "bfbe9da041a6471ba68a9a4115720fdc"
}

Step 2: Verify the Web Proof

Now verify the generated Web Proof by sending the json from the /prove response:

curl -X POST https://web-prover.production.vlayer.xyz/api/v2.0/verify \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ak_ESW9RZSNVBEQ728R8PJBPR80E6EFA9QX" \
  -d '{
    "data": "014000000000000000899cdccd31337c96bb9e519aa438ed73cdb47dda5c80e995ef0a1c04bf6c563730cde41724dafc1391b1b81acc5d989a7f7add8...",
    "version": "0.1.0-alpha.12",
    "meta": {
      "notaryUrl": "https://notary.vlayer.xyz/v0.1.0-alpha.12"
    }
  }'
const response = await fetch('https://web-prover.production.vlayer.xyz/api/v2.0/verify', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer ak_ESW9RZSNVBEQ728R8PJBPR80E6EFA9QX'
  },
  body: JSON.stringify(presentation)
});

const data = await response.json();
console.log(JSON.stringify(data, null, 2));

Response:

{
  "apiVersion": "v2.0",
  "data": {
    "notaryKeyFingerprint": "a7e62d7f17...",
    "request": {
      "body": null,
      "headers": [
        "connection: close",
        "host: data-api.binance.vision"
      ],
      "method": "GET",
      "raw": "474554202f...",
      "url": "/api/v3/exchangeInfo?symbol=ETHUSDC",
      "version": "HTTP/1.1"
    },
    "response": {
      "body": "{\"timezone\":...",
      "headers": [
        "date: Thu, 14 May 2026 13:32:18 GMT",
        "content-type: application/json;charset=UTF-8",
        "content-length: 5753",
        "connection: close",
        "server: nginx"
      ],
      "raw": "485454502f...",
      "status": 200,
      "version": "HTTP/1.1"
    },
    "serverDomain": "data-api.binance.vision",
    "tlsTimestamp": 1778765537
  },
  "success": true,
  "traceId": "65cf3f6e26ae42f79609b54379fac0aa"
}