# \[Solved\] Creating a cloudinary signature for API POST call

**URL:** https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893
**Category:** Questions about Thunkable X
**Tags:** cloudinary, solved, webapi
**Created:** [December 29, 2020, 7:40am UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893 "2020-12-29T07:40:33Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![japa6225a](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/japa6225a/32/95982_2.png) [@japa6225a](https://community.thunkable.com/u/japa6225a)
#### Post date: [April 2, 2021, 1:52am UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/21 "2021-04-02T01:52:19Z")

</div>

I received a excellent reply from Cloudinary support. It’s taking me a bit of time to decipher 🤣

-----8\<--------  
Thanks for contacting us, and for letting me know what you’ve tried and where you’ve looked for an answer already (that’s unusual, and appreciated!)  
At a high level, there are two things it’s important to be aware of regarding how Strict Transformations works, which are that 1) Strict transformations affects what methods can create a new derived image in your account without some additional authentication being provided, and  
2) Strict transformations doesn’t directly affect how an existing derived image can be accessed, nor how the original file can be accessed  
A related concept to mention again is ‘derived asset’ - a common use-case for Cloudinary is that you upload original assets to us, then on your website or application you use a URL that tell us to return that asset, with some transformations applied in the URL, and the version with the transformations applied is called a ‘derived’ asset.  
If I understand you correctly, you’d like to create a watermarked copy of an image, allow users to see that watermarked copy, but it shouldn’t be possible for them to see the original asset without authentication, or to change the watermark / add other options. Additionally, you’d prefer to hide what the transformation options used were.  
In that case, here’s what I recommend  
• Upload the original assets with type ‘private’, so that the original can’t be accessed without a signature, but existing derived assets can be accessed publicly: [Media Access Control and Authentication | Cloudinary](https://cloudinary.com/documentation/control_access_to_media#private_media_assets)  
• Enable Strict Transformations on your account: [Media Access Control and Authentication | Cloudinary](https://cloudinary.com/documentation/control_access_to_media#strict_transformations)  
• Create a named transformation in your account which applies the watermark, and also resizes the image to the size you need it for your application (I also recommend adding ‘q\_auto: good’ as the quality setting to reduce file size further): [Chained and Named Image Transformations | Cloudinary](https://cloudinary.com/documentation/chained_and_named_transformations#named_transformations)  
• In your upload call, or upload preset, request that the watermarked copy is created via an eager transformation  
• Alternatively, use the explicit() API method to create a derived version using that named transformation, if the files have already been uploaded  
• Alternatively, if all the images will have the same watermark, ‘allow’ the named transformation in your account settings, which will allow new derived images to be created “on the fly” if they use those transformation options  
• Use the URL of the watermarked copy in your application or website  
With that strategy, users will see the name of the named transformation in the URL, but not the options inside that named transformation, and they won’t be able to access the original file by removing the transformations, or change the transformation options to remove the watermark  
May I ask you to please take a look and see if that helps?  
Regards,  
Stephen  
Developer Support Engineer  
Customer Success team  
Cloudinary UK

---

<div class="post-metadata">

### Author: ![japa6225a](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/japa6225a/32/95982_2.png) [@japa6225a](https://community.thunkable.com/u/japa6225a)
#### Post date: [April 2, 2021, 2:00am UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/22 "2021-04-02T02:00:11Z")

</div>

I have updated the generator to include a private overload. What Stephen suggested works for me (as in theory). Save as private and share a signed link including a named transformation. This way I can share the image, scaled and watermarked, and the end user cannot access the original image.

> **[cloudinary generator online](https://docs.google.com/spreadsheets/d/1vLjugF9FcRfsX7bOka4WfCQRwE_Vt5N3DQrtdx34HyU/edit?usp=sharing)**
>
> Sheet1
> 
> Make a copy so you don't accidentiling give away your Cloudinary Secret.
> Key,Value,\<a...

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/c/0c1cd9552be5e7a6d274eb2b126e78704c0f3432.png)

I’ll set up a Cloudinary Generator app soon. So you can 1. generated a curl example and 2. inspect the blocks.

Ta  
James

I’ll set up the generator app when the current project is ready for live testing. Here are some working blocks.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/b/ab37d9a0fdf923443666b723bad437e3b23d053e.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/6/a6c6de88cb5a624257f87b573229169f901e7f8c.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/1/11422bd14045eda608d194fe7cafe8ca071bcf3d.png)  
Uploading as private allows for derived image urls links can be shared so no eager transformation required  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/5/75cc8335b9ffcaccbf59c60bbc21fd8d561468ae.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/e/6e74c686db11c7b2490b9211ad7ceee3faf28182.png)  
I hope these can assist others.

James

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [April 7, 2021, 9:28am UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/23 "2021-04-07T09:28:06Z")

</div>

Thanks @japa6225a - this is really thorough and very helpful. Thanks for sharing this with the Community! 👍

---

<div class="post-metadata">

### Author: ![codeemaker](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/codeemaker/32/101762_2.png) [@codeemaker](https://community.thunkable.com/u/codeemaker)
#### Post date: [April 7, 2021, 10:33am UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/24 "2021-04-07T10:33:09Z")

</div>

Could you share the link

---

<div class="post-metadata">

### Author: ![japa6225a](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/japa6225a/32/95982_2.png) [@japa6225a](https://community.thunkable.com/u/japa6225a)
#### Post date: [April 8, 2021, 5:12am UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/25 "2021-04-08T05:12:48Z")

</div>

I would mate but what worked one day, didn’t the next. I decided to try a different way to get the Signature as this is the bit I had the most issues with just like some other. When I have a constant version, I will create a demo app. If only Thunkable had SHA1 encryption included.  
I do know that I am using Cloudinary for a purpose it is not really designed for but these challenges drive me. Mostly mad but drive me 🤣

---

<div class="post-metadata">

### Author: ![skulamester](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/skulamester/32/100480_2.png) [@skulamester](https://community.thunkable.com/u/skulamester)
#### Post date: [April 8, 2021, 6:51am UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/26 "2021-04-08T06:51:15Z")

</div>

Good luck! I am really looking forward to your result as well. 😂

---

<div class="post-metadata">

### Author: ![japa6225a](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/japa6225a/32/95982_2.png) [@japa6225a](https://community.thunkable.com/u/japa6225a)
#### Post date: [April 25, 2021, 6:23am UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/27 "2021-04-25T06:23:34Z")

</div>

Think I finally have it @tatiang, @skulamester and others.  
Using [Convert Curl to HTTP Request](https://reqbin.com/req/c-w7oitglz/convert-curl-to-http-request) yesterday I realised that the hashify was not returning the right hash from the url parameters using thunkables webapi url alone. Add the header and the text to as the body and fist pumps. Still testing but the first 10 or so have worked 😁 🤞

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/7/2764446d26c346ac1f9e68a46c34615542c6474f.png)

---

<div class="post-metadata">

### Author: ![skulamester](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/skulamester/32/100480_2.png) [@skulamester](https://community.thunkable.com/u/skulamester)
#### Post date: [April 27, 2021, 9:13am UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/28 "2021-04-27T09:13:10Z")

</div>

Hi @japa6225a!

Thank you for your research and sharing all the results with us, but I have a question. The eager does not work for me, I want a 200x200 image to be uploaded, but I hadn’t succeed. I hope you have some idea.

My blocks:

 ![Screenshot 2021-04-27 at 11.07.59](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/5/7598adbdf03298b0c505d4e50ffaf7231c7a5f4e.png)

What I get:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/1/c1c5bb1eb64fb7bb22fe0312294dead0c7b5bfb3.png)

---

<div class="post-metadata">

### Author: ![japa6225a](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/japa6225a/32/95982_2.png) [@japa6225a](https://community.thunkable.com/u/japa6225a)
#### Post date: [April 27, 2021, 10:16am UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/29 "2021-04-27T10:16:51Z")

</div>

Yes. This I have found out too (haven’t been successful yet). Cloudinary is designed for web based applications. Yes, you can upload but the eager is used for showing the uploaded image on your site/app. So we have been trying to use cloudinary for image editing when it is only a transformation. Just today I finally got a new error, “file:///” url is not supported? FFS. So I am now back to ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/3/f3065f97c5b80fb3cc4e257384c403accd2de837.png)  
and then use the returned url to make a new image to make it a private image. Then in the response, there are 2 url’s which I grab the Secure URL and add a preset transformation. In this case, resized for quicker download and watermarked. [https://res.cloudinary.com/meatoff6/image/private/s--zGMYLsFr--/t\_MOTsel50p/MO6-Thirsty\_Chiefs\_Meatoff-MeatOff\_team\_1-a-Hand\_in-1619512510.jpg](https://res.cloudinary.com/meatoff6/image/private/s--zGMYLsFr--/t_MOTsel50p/MO6-Thirsty_Chiefs_Meatoff-MeatOff_team_1-a-Hand_in-1619512510.jpg)  
Another one I realised today (brain is getting slower ☹ ) is the web api is asynchronous. @tatiang this might help your initial issue too if you haven’t found it already.  
[Wrapping Asynchronous (then do) blocks into a Synchronous Function resolves unpredictable results](https://community.thunkable.com/t/wrapping-asynchronous-then-do-blocks-into-a-synchronous-function-resolves-unpredictable-results/910511)  
With resizing, I have seen some say to add the image to a canvas and then resize but have not tried that one yet.

---

<div class="post-metadata">

### Author: ![skulamester](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/skulamester/32/100480_2.png) [@skulamester](https://community.thunkable.com/u/skulamester)
#### Post date: [April 29, 2021, 10:23am UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/30 "2021-04-29T10:23:19Z")

</div>

> [@japa6225a](#):
>
> new error, “file:///” url is not supported

I am facing the same problem as well.

> [@japa6225a](#):
>
> preset transformation.

I tried this thing and solves all of my problems! Amazing!

---

<div class="post-metadata">

### Author: ![Dario\_Cappello](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Dario\_Cappello](https://community.thunkable.com/u/Dario_Cappello)
#### Post date: [January 24, 2022, 6:11pm UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/31 "2022-01-24T18:11:01Z")

</div>

Hello. I didn’t understand how the problem was solved “file:///” url is not supported. Can you help me with more details?

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [January 24, 2022, 6:21pm UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/32 "2022-01-24T18:21:51Z")

</div>

What is it you’re trying to do? Are you wanting to transform an image stored in Cloudinary? Or make a transformation when an image is uploaded? Or something else?

I’ll admit to not understanding all of this post but… have you tried this method?

> [@\[Solved\] Creating a cloudinary signature for API POST call](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/22):
>
> I have updated the generator to include a private overload. What Stephen suggested works for me (as in theory). Save as private and share a signed link including a named transformation. This way I can share the image, scaled and watermarked, and the end user cannot access the original image. [image] I’ll set up a Cloudinary Generator app soon. So you can 1. generated a curl example and 2. inspect the blocks. Ta James I’ll set up the generator app when the current project is ready for live t…

---

<div class="post-metadata">

### Author: ![Dario\_Cappello](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Dario\_Cappello](https://community.thunkable.com/u/Dario_Cappello)
#### Post date: [January 24, 2022, 7:12pm UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/33 "2022-01-24T19:12:09Z")

</div>

> [@japa6225a](#):
>
> “file:///” url is not supported

To date I take photos and through MEDIA\_DB I upload to cloudinary. I needed to delete the photos on cloudinary. With a little research on the community I can now upload and delete if the image is on https: /// … but if it comes from a photo taken with a mobile phone or from an image gallery I have this error:

 ![Screenshot_20220124_185629_com.gmail.dariocappello.cloudinaryuploaddeletecopyMOD](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/2/22796aafa055c764872c7a7ffb056d8de9c0148d.jpeg)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [January 24, 2022, 7:16pm UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/34 "2022-01-24T19:16:07Z")

</div>

But if you’ve uploaded the image to Cloudinary, then you have a cloud-based url for that image. You wouldn’t be able to delete a photo stored on a phone using the Cloudinary API. The photo has to be stored in Cloudinary. You shouldn’t be using a file:/// url at all.

---

<div class="post-metadata">

### Author: ![Dario\_Cappello](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Dario\_Cappello](https://community.thunkable.com/u/Dario_Cappello)
#### Post date: [January 24, 2022, 8:31pm UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/35 "2022-01-24T20:31:12Z")

</div>

yes, but to speed things up, I would like to upload and delete with api\_cloudinary. and the API upload files with https: // and not local files. I wanted to know if it was possible to remedy. Because alternatively I upload with cloudinary and delete with cloudinary api, of course.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [January 24, 2022, 9:35pm UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/36 "2022-01-24T21:35:43Z")

</div>

You can use the Camera/Media blocks to allow the user to upload photos to Cloudinary. But I don’t know of a way to use the API to upload a photo directly from the phone.

---

<div class="post-metadata">

### Author: ![Dario\_Cappello](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Dario\_Cappello](https://community.thunkable.com/u/Dario_Cappello)
#### Post date: [January 25, 2022, 11:17am UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/37 "2022-01-25T11:17:25Z")

</div>

OK, all right!

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [January 29, 2022, 5:17am UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/38 "2022-01-29T05:17:29Z")

</div>

@Dario_Cappello  
See this post

> [@Upload images to Cloudinary using Web Api, only,](https://community.thunkable.com/t/upload-images-to-cloudinary-using-web-api-only/1701875/7):
>
> See this code snippet from w3schools \<!DOCTYPE html\> \<html\> \<head\> \<title\>Title of the document\</title\> \</head\> \<body\> \<input type="file" onchange="encodeImageFileAsURL(this)" /\> \<script\> function encodeImageFileAsURL(element) { let file = element.files[0]; let reader = new FileReader(); reader.onloadend = function() { document.write('RESULT: ', reader.result); } reader.readAsDataURL(file); } \</script\> \</body\>…

---

<div class="post-metadata">

### Author: ![Dario\_Cappello](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Dario\_Cappello](https://community.thunkable.com/u/Dario_Cappello)
#### Post date: [February 2, 2022, 1:01pm UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/39 "2022-02-02T13:01:39Z")

</div>

Thanks muneer, I try this modification now!

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 2, 2022, 1:03pm UTC](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/40 "2022-02-02T13:03:45Z")

</div>

@muneer has a great solution linked there

Here’s another (slightly more advanced but alternative solution) for you @Dario_Cappello

> [@Upload images to Cloudinary using Web Api, only,](https://community.thunkable.com/t/upload-images-to-cloudinary-using-web-api-only/1701875/12):
>
> I decided to put together a quick couple videos. Hopefully this will help you all with deleting from cloudinary @muneer @nmtabooks @domhnallohanlon eyes

[Previous page](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893.md?page=1)

[Next page](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893.md?page=3)
