{
  "slug": "call-zendesk-from-retool-securely",
  "title": "Call zendesk api from retool without exposing api token",
  "metaTitle": "Call zendesk api from retool - RealComposer",
  "metaDescription": "Call zendesk api from retool without exposing api token. Keep Zendesk keys in RealComposer Vault; Retool uses rc_live_ tokens only.",
  "headline": "Retool support desks with vault-backed Zendesk auth",
  "category": "security",
  "categoryLabel": "Security & Secret Vault",
  "urgency": 9,
  "clientPlatform": "Retool",
  "upstreamServices": [
    "Zendesk"
  ],
  "searchIntentQuery": "call zendesk api from retool without exposing api token",
  "directAnswerSummary": "Internal tools query tickets without embedding subdomain API tokens in queries. For \"call zendesk api from retool without exposing api token\", store ZENDESK_API_TOKEN in Secret Vault, call https://{{secrets.ZENDESK_SUBDOMAIN}}.zendesk.com/api/v2/tickets.json from a Worker, and let Retool hit only https://realcomposer.com/v1/workspace/call-zendesk-from-retool-securely with an rc_live_ client token.",
  "problem": {
    "title": "Why Retool leaks Zendesk credentials",
    "explanation": "Attackers routinely extract Zendesk secrets from Retool builds. Direct browser calls also expose internal error payloads with hostnames.",
    "risks": [
      "Production Zendesk keys copied from Retool bundles",
      "Compliance violations after credential leaks",
      "Attackers replaying vault-grade scopes from a laptop"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Store upstream credentials in Secret Vault",
      "description": "Create ZENDESK_API_TOKEN vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders."
    },
    {
      "stepNumber": 2,
      "title": "Target the real upstream URL",
      "description": "Configure headersTemplate to inject vault secrets, target https://{{secrets.ZENDESK_SUBDOMAIN}}.zendesk.com/api/v2/tickets.json, and Add output mapping fields that mirror the JSON contract your screen already expects."
    },
    {
      "stepNumber": 3,
      "title": "Query from Retool",
      "description": "Allowed origins on the token should list every Retool host that calls this URL.",
      "codeSnippet": "// REST resource or JS query\nconst rows = await fetch('https://realcomposer.com/v1/workspace/call-zendesk-from-retool-securely', {\n  headers: { Authorization: 'Bearer rc_live_token' }\n}).then(r => r.json());"
    }
  ],
  "pipelineConfig": {
    "name": "Call zendesk api from retool without exposing api token",
    "method": "GET",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "zendesk",
        "upstreamUrlTemplate": "https://{{secrets.ZENDESK_SUBDOMAIN}}.zendesk.com/api/v2/tickets.json",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.ZENDESK_API_TOKEN}}"
        },
        "timeoutMs": 3000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "ticketId",
          "sourcePath": "tickets.0.id",
          "type": "number",
          "sourceStep": "zendesk"
        },
        {
          "targetPath": "subject",
          "sourcePath": "tickets.0.subject",
          "type": "string",
          "sourceStep": "zendesk"
        },
        {
          "targetPath": "status",
          "sourcePath": "tickets.0.status",
          "type": "string",
          "sourceStep": "zendesk"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_call-zen",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "call-zendesk-from-retool-securely"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "ticketId": "sample",
    "subject": "sample",
    "status": "sample"
  },
  "curlSnippet": "curl -X GET \"https://realcomposer.com/v1/workspace/call-zendesk-from-retool-securely\" \\\n  -H \"Authorization: Bearer rc_live_client_token\"",
  "faqs": [
    {
      "question": "Which Zendesk credential belongs in the vault for this pipeline?",
      "answer": "Log request IDs for call-zendesk-from-retool-securely, not raw Zendesk payloads, because upstream bodies may include PII."
    },
    {
      "question": "What cache key does RealComposer use?",
      "answer": "call-zendesk-from-retool-securely vault headers attach server-side, but Anthropic or OpenAI model and messages must come from the client body."
    },
    {
      "question": "Can I restrict which domains call this pipeline?",
      "answer": "Upstream steps in call-zendesk-from-retool-securely honor timeoutMs and optional fallback JSON without leaking secrets."
    }
  ],
  "relatedRecipeSlugs": [
    "retool-public-app-hide-api-credentials",
    "connect-stripe-to-retool-securely"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/call-zendesk-from-retool-securely",
    "markdown": "https://realcomposer.com/recipes/call-zendesk-from-retool-securely.md",
    "json": "https://realcomposer.com/recipes/call-zendesk-from-retool-securely.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=call-zendesk-from-retool-securely&via=agent"
  }
}