# Code blocks for this API Request

**URL:** https://community.thunkable.com/t/code-blocks-for-this-api-request/2498768
**Category:** Questions about Thunkable X
**Tags:** cloudinary, webapi
**Created:** [July 8, 2023, 10:58am UTC](https://community.thunkable.com/t/code-blocks-for-this-api-request/2498768 "2023-07-08T10:58:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![visualdisigner10ucqs](https://avatars.discourse-cdn.com/v4/letter/v/4af34b/32.png) [@visualdisigner10ucqs](https://community.thunkable.com/u/visualdisigner10ucqs)
#### Post date: [July 8, 2023, 10:58am UTC](https://community.thunkable.com/t/code-blocks-for-this-api-request/2498768/1 "2023-07-08T10:58:00Z")

</div>

Hi Community!  
Here’s a Sample Request of Cloudinary Upload API in Postman-

 ![vbnvbn](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/1/f1a1bf7dbf0661577f596c3b52ce19b4c224bc8b.jpeg)  
I tried some Blocks but there was an error showing in my android phone.  
 ![DFGDFGDFGD](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/8/e8512368934fade7713b0aec8cffddc2e3623c69.jpeg)  
Docs-[Cloudinary Upload API](https://cloudinary.com/documentation/image_upload_api_reference)

---

<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: [July 9, 2023, 4:28am UTC](https://community.thunkable.com/t/code-blocks-for-this-api-request/2498768/2 "2023-07-09T04:28:36Z")

</div>

Is there a reason you are using the Cloudinary API? Thunkable has built-in support for Cloudinary uploads: [Files - Thunkable Docs](https://docs.thunkable.com/files).

If for some reason you still need to use the API, what is the error message you’re getting?

---

<div class="post-metadata">

### Author: ![pacecode](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pacecode/32/209017_2.png) [@pacecode](https://community.thunkable.com/u/pacecode)
#### Post date: [July 9, 2023, 11:48pm UTC](https://community.thunkable.com/t/code-blocks-for-this-api-request/2498768/4 "2023-07-09T23:48:05Z")

</div>

A very longg HTML code was returned

 ![Screenshot_2023-07-10-05-13-07-95_ae1f93045b87aacac90efbb155289789](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/8/88b4bee8aac54a482b1f4a4df7d2cdb6248b938e.jpeg)

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [July 10, 2023, 11:18am UTC](https://community.thunkable.com/t/code-blocks-for-this-api-request/2498768/5 "2023-07-10T11:18:56Z")

</div>

Hello @visualdisigner10ucqs welcome to the community!

Instead of using the “Image4’s Picture” block, you will need to use the response from the Web Viewer and the Web Viewer needs to have an HTML file that converts the image to base64.

To create the HTML file you can use the HTML code I shared here: [WEB API Firebase Storage It does not upload the file to the server - #4 by ioannis](https://community.thunkable.com/t/web-api-firebase-storage-it-does-not-upload-the-file-to-the-server/2369895/4)

Here is a post from the Cloudinary community about uploading an image as base64.  
[Uploading assets using a base64 DATA URI – Cloudinary Support](https://support.cloudinary.com/hc/en-us/articles/203125741-Uploading-assets-using-a-base64-DATA-URI#:~:text=In%20addition%20uploading%20assets%20from,by%20passing%20a%20remote%20URL.)

---

<div class="post-metadata">

### Author: ![visualdisigner10ucqs](https://avatars.discourse-cdn.com/v4/letter/v/4af34b/32.png) [@visualdisigner10ucqs](https://community.thunkable.com/u/visualdisigner10ucqs)
#### Post date: [July 11, 2023, 11:10am UTC](https://community.thunkable.com/t/code-blocks-for-this-api-request/2498768/6 "2023-07-11T11:10:22Z")

</div>

![Screenshot_2023-07-11-15-47-46-23_2bbfbfee96a5dfce998f962ebb8b5da3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/b/4bcaf5f01d3e79838fdb80f80bee5747eab883ac.jpeg)  
 ![Capturefghfgh](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/0/009d60cd4242936b35af194b868215b1f3318c36.jpeg)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [October 10, 2023, 8:36am UTC](https://community.thunkable.com/t/code-blocks-for-this-api-request/2498768/8 "2023-10-10T08:36:21Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
