This support forum is no longer in use. Please use the Cloudinary Community at https://community.cloudinary.com/ to receive assistance from other members of the community and from Cloudinary's support team. For account-specific questions or if you believe that you've encountered a bug, please contact the Cloudinary team directly via the "submit a request" option on this support site.

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

Comments

3 comments

  • Avatar
    Aleksandar Kostadinov

    Hi,

    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:

    2ef149fe190ef266c766ae5104b3193d5327e93f

    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?

    0
    Comment actions Permalink
  • Avatar
    Infodental

    Hi,

    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:

    4c7acd1b4f6693efaa3320411018b70c4bcfdad3

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

    What is wrong?

    0
    Comment actions Permalink
  • Avatar
    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>@api.cloudinary.com/v1_1/<CLOUD_NAME>/resources/image

    Please let us know if you are still having issues. 

    0
    Comment actions Permalink

Post is closed for comments.