Uploading API issue

Dear Imagekit Team,

I’m using the below request to make the API to upload the image to Imagekit. I realized that it just accepts only the params token, expire, signature... When I add the Authorization header even combining with token, expire, signature... It returns the error 400 Bad request (Your request is missing authorization parameters. Read the upload API documentation.). Can you explain that message? Or I’m using it wrongly?

curl --location 'https://upload.imagekit.io/api/v1/files/upload' \
--header 'Accept: application/json' \
--header 'Authorization: Basic ABC123' \
--form 'file=@"/path/to/file"' \
--form 'fileName="mobile"' \
--form 'publicKey=""' \
--form 'signature=""' \
--form 'expire=""' \
--form 'token=""'

Thanks in advance!

The Upload API expects a single authentication method per request. If you’re performing a server-side upload, use Basic Auth via the Authorization header. For client-side uploads, use the token-based approach by including the token, expire, and signature parameters.

Passing both authentication methods in the same request is not allowed and will result in the error:
“Your request is missing authorization parameters. Read the upload API documentation.”

Thanks @imagekit_kashish

Are there any updates lately? Or this is original behavior since the message is also strange?

This is a recent update we’ve made to ensure that only one authentication method is used per request, based on your specific use case.