Skip to main content

I can't upload image via curl because error: Invalid Signature



  • Aleksandar Kostadinov


    I've checked the logs on our side and the correct string to sign was indeed "eager=w_200,h_200&public_id=sample_image&timestamp=1514500082<API_SECRET>" which you mentioned you used.

    In that case, the only reason it wouldn't have worked is due to the API SECRET. May I please ask you to double-check the value you are using for that? You can calculate the signature in the command line directly by running

    echo -n 'eager=w_200,h_200&public_id=sample_image&timestamp=1514500082<API_SECRET>' | sha1sum

    The correct signature you should get back is:


    By the way, I see that you are uploading an image from your account into the same account which will create duplicates and cost you Transformation and Storage quota. Is that intentional?

  • Infodental


    Tanks for yours explains. I am uploading an imagem from my account. That is intentional to first test. 

    I use MacOS and try generate sha1 of the follow string into my terminal:

    echo -n 'eager=w_200,h_200&public_id=sample_image&timestamp=1514500082<API_SECRET>' | shasum

    That return:


    I put exactly string "<API_SECRET>" to return same your sha1 (2ef149fe190ef266c766ae5104b3193d5327e93f), but return different sha1.

    What is wrong?

  • Zachary Gould

    Hey there, 

    Sorry our forum system was having some issues and I'm afraid your question was lost. I'd like to make sure you were able to move forward and resolve your issue. '<API_SECRET>' will actually need to be replaced with the API secret associated with your account. 

    The API uses Basic Authentication over secure HTTP. Your Cloudinary API Key and API Secret (which can be found on the Dashboard page of your Cloudinary console) are used for authentication.

    You can experiment with returning a list of the images on your own Cloudinary account by replacing the API_KEYAPI_SECRET, and CLOUD_NAME in the cURL command below:

    curl https://<API_KEY>:<API_SECRET><CLOUD_NAME>/resources/image

    Please let us know if you are still having issues. 


Post is closed for comments.