# How to delete images from cloudinary

**URL:** <https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [July 11, 2021, 3:32pm UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766 "2021-07-11T15:32:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![arleen](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arleen](https://community.thunkable.com/u/arleen)\
**Post date:** [July 11, 2021, 3:32pm UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/1 "2021-07-11T15:32:48Z")

</div>

Hai  
I want to delete images from coludinary. When I try from nodejs it is working but from thunkable it is not working. I get page not found error in title tag.  
This is what I used. I also tried without timestamp.

 ![aaa](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/0/30a2d950c19c00e2bd2ea24ccb553fe3099a47f9.png)

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [July 11, 2021, 3:34pm UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/2 "2021-07-11T15:34:55Z")

</div>

Is a POST appropriate here, or is Cloudinary expecting a GET?

---

<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:** [July 11, 2021, 4:48pm UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/3 "2021-07-11T16:48:51Z")

</div>

Yes, it should be **POST**.

[Edit]  
I checked the documentation and following are two samples to delete an image and a video.

```auto
curl https://api.cloudinary.com/v1_1/demo/image/destroy -X POST --data 'public_id=sample&timestamp=173719931&api_key=436464676&signature=a788d68f86a6f868af'

```

```auto
curl https://api.cloudinary.com/v1_1/demo/image/destroy -X POST --data 'public_id=sample&resource_type=video&timestamp=173719931&api_key=436464676&signature=a788d68f86a6f868af'

```

You will need to manually generate the `signature` using SHA-1 hashing to be able to complete the process.

The signature should consist of:

- Public\_id
- Timestamp
- Secret key  
and it should be in this order using = between the parameter and the value and & between each pair but not the `secret key`

I also noticed from the examples above that these should go into `body query` not command line parameters.

If my observation is correct then the image of the `Web API` given in the first post should not work.

---

<div class="post-metadata">

**Author:** ![arleen](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arleen](https://community.thunkable.com/u/arleen)\
**Post date:** [July 12, 2021, 5:27am UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/4 "2021-07-12T05:27:21Z")

</div>

Thanks for reply.  
I changed to body all parameters like this .  
Now also I get the same error.

 ![a2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/3/43ef387716653cba28da37cba772d3145ccf4c37.png)  
I took the time stamp from url uploaded by mediaDB.

---

<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:** [July 12, 2021, 7:30am UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/5 "2021-07-12T07:30:30Z")

</div>

Try to use this as the URL:

[https://api.cloudinary.com/v1\_1/CLOUD\_NAME/image/destroy](https://api.cloudinary.com/v1_1/CLOUD_NAME/image/destroy)

---

<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:** [July 12, 2021, 7:32am UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/6 "2021-07-12T07:32:36Z")

</div>

For me, this way works:

 ![Screenshot 2021-07-12 at 9.30.53](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/b/db974e97025b5c3d53ae103500a605ca0816e834.png)

---

<div class="post-metadata">

**Author:** ![arleen](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arleen](https://community.thunkable.com/u/arleen)\
**Post date:** [July 12, 2021, 9:12am UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/7 "2021-07-12T09:12:27Z")

</div>

I tried something like this but not working

 ![a3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/8/28cb1069de19bc23be0343463f760c03fcaaed1b.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:** [July 12, 2021, 10:10am UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/8 "2021-07-12T10:10:27Z")

</div>

Is XX your cloud name?

---

<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:** [July 12, 2021, 10:10am UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/9 "2021-07-12T10:10:47Z")

</div>

What is the response/error message?

---

<div class="post-metadata">

**Author:** ![arleen](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arleen](https://community.thunkable.com/u/arleen)\
**Post date:** [July 12, 2021, 10:25am UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/10 "2021-07-12T10:25:22Z")

</div>

```auto
I get a long message. In title it shows page not found.

```

---

<div class="post-metadata">

**Author:** ![arleen](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arleen](https://community.thunkable.com/u/arleen)\
**Post date:** [July 12, 2021, 10:27am UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/11 "2021-07-12T10:27:11Z")

</div>

here xx represents my cloud name.

---

<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:** [July 12, 2021, 10:36am UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/12 "2021-07-12T10:36:51Z")

</div>

The key of solving this topic could be in the error message. Please copy it here.

---

<div class="post-metadata">

**Author:** ![arleen](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arleen](https://community.thunkable.com/u/arleen)\
**Post date:** [July 12, 2021, 10:41am UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/13 "2021-07-12T10:41:25Z")

</div>

this is the link for a sample please check it out.  
[https://x.thunkable.com/copy/41b227eac48d9f0c75fc1e9d9bf26660](https://x.thunkable.com/copy/41b227eac48d9f0c75fc1e9d9bf26660)

---

<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:** [July 12, 2021, 11:47am UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/14 "2021-07-12T11:47:10Z")

</div>

As I mentioned before, you are using a bad URL in the URL field:

> [@skulamester](#):
>
> Try to use this as the URL:
> 
> [https://api.cloudinary.com/v1\_1/CLOUD\_NAME/image/destroy](https://api.cloudinary.com/v1_1/CLOUD_NAME/image/destroy)

Don’t forget the **/v1\_1/** part. Let me know if it does work.

---

<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:** [July 12, 2021, 2:06pm UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/15 "2021-07-12T14:06:03Z")

</div>

The documentation refers to the URL @skulamester mentioned and does not give any reference to the other URL used by @arleen

---

<div class="post-metadata">

**Author:** ![arleen](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arleen](https://community.thunkable.com/u/arleen)\
**Post date:** [July 12, 2021, 3:37pm UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/16 "2021-07-12T15:37:30Z")

</div>

I changed signature property directly string like this

 ![s1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/d/8d505d164e7feb49e1bfeb542e1f1487a17aadae.png)  
now i get this error  
“error”: {

```
    "message": "Invalid Signature kqb8gbway27wvmqvrspdt-fdjms. String to sign - 'public_id=y5b9oqtyqge6z3m2wwhf&timestamp=1626015856'."

```

I copied all parameters from cloudinary, I don’t know what’s the wrong.  
Thanks.

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [July 12, 2021, 4:02pm UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/17 "2021-07-12T16:02:52Z")

</div>

Is that signature the result of hashing public\_id=y5b9oqtyqge6z3m2wwhf&timestamp=1626015856 PLUS your api secret , as described here?  
[https://cloudinary.com/documentation/upload\_images#generating\_authentication\_signatures](https://cloudinary.com/documentation/upload_images#generating_authentication_signatures)

---

<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:** [July 12, 2021, 4:10pm UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/18 "2021-07-12T16:10:30Z")

</div>

You have to create a signature, see this:

> [@\[Solved\] Creating a cloudinary signature for API POST call](https://community.thunkable.com/t/solved-creating-a-cloudinary-signature-for-api-post-call/1041893/27):
>
> 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 grin crossed_fingers

---

<div class="post-metadata">

**Author:** ![arleen](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@arleen](https://community.thunkable.com/u/arleen)\
**Post date:** [July 12, 2021, 6:00pm UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/19 "2021-07-12T18:00:48Z")

</div>

I tried for hours but I could not figure out my problems. I am a beginner.  
Can you please write the correct code block.  
this is the link of sample I am trying.  
[https://x.thunkable.com/copy/1af8f723740991379c4bf1fa63b56270](https://x.thunkable.com/copy/1af8f723740991379c4bf1fa63b56270)  
uploading also not working.  
Thanks

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [July 12, 2021, 6:17pm UTC](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766/20 "2021-07-12T18:17:26Z")

</div>

You should be able to get uploading working without having to call the API - there’s sample code here:

> **[Media DB by Cloudinary](https://docs.thunkable.com/media-db)**

I’m going to ask my same question again - how did you hash your signature string? Looking at your project, I don’t see where you pass in the string to be hashed for the first API call. That might be an artifact of the copying process, but if not, that’s definitely a problem.

[Next page](https://community.thunkable.com/t/how-to-delete-images-from-cloudinary/1390766.md?page=2)
