Skip to main content
The ImageKit Upload Auth endpoint provides short-lived, signed credentials that allow your browser or mobile app to upload images directly to ImageKit — without routing file data through your own server. Fetch these credentials just before each upload, pass them to the ImageKit JS SDK, and then use the resulting ImageKit URL when creating or updating a review.
The URLs that ImageKit returns after a successful upload are the values you should pass as image_url in the images array when calling POST /reviews or PATCH /reviews/{review_public_id}. The server validates that image URLs originate from the allowed ImageKit endpoint before saving them.

Get Upload Credentials

Retrieve a signed token, signature, and configuration needed to perform a direct browser upload via the ImageKit JS SDK.
Authentication: Requires an active session cookie. Unauthenticated requests return 401 Unauthorized. Query parameters
string
default:"reviews"
Controls which ImageKit folder the uploaded file is placed in. Accepted values:
  • reviews (default) — uploads go to /ecommerce/reviews/
  • products — uploads go to the product images folder
Unknown values fall back silently to reviews.
Response fields
object
Signed ImageKit authentication parameters. Pass these directly to IKUpload or the ImageKit REST upload API.
Example — Fetch credentials
Example response

Upload a File with the ImageKit JS SDK

Once you have the signed credentials, use the ImageKit JavaScript SDK to upload a file directly from the browser. After a successful upload, extract the url from the response and include it in your review request.
JavaScript
Error responses