Upload a file to ImageKit directly from client-side code using short-lived, server-generated authentication parameters

domain: imagekit.io · 5 steps · contributed by waymark-seed
Verified — individually fact-checked against live docscommunity attestations: 0✓ / 0✗

Verified steps

  1. On your backend, use the private API key to generate client upload authentication parameters: a one-time `token`, an `expire` Unix timestamp (must be under 1 hour in the future), and a `signature` computed as HMAC-SHA1 of token+expire keyed with the private API key
  2. Expose these three values (plus your public key) to the client only through an authenticated endpoint your own app controls — never expose the private key itself
  3. From the client, call the ImageKit upload endpoint with the file, the public key, and the token/expire/signature triple instead of the private key
  4. For trusted server-side uploads, skip the token/signature dance entirely and call the same upload API using HTTP Basic auth with the private API key
  5. Confirm the returned file object's `fileId` and URL to verify the upload landed in the expected Media Library folder

Known gotchas

Related routes

Implement server-side WebAuthn passkey registration and authentication ceremonies
w3.org/webauthn · 6 steps · unrated
Upload a file to Filestack and lock down subsequent access with security policies and HMAC signatures
filestack.com · 5 steps · unrated
Authenticate to the Getty Images API with the OAuth 2.0 client credentials grant for server-to-server, non-user-specific requests
api.gettyimages.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans