# Errors while working on Slazzer API

**URL:** <https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382>\
**Category:** Questions about Thunkable X\
**Tags:** help\
**Created:** [April 21, 2023, 4:27am UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382 "2023-04-21T04:27:09Z")\
**Posts on this page:** 15\
**Page:** 1

<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:** [April 21, 2023, 4:27am UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/1 "2023-04-21T04:27:09Z")

</div>

Hi Community!  
I am Getting a Response from Slazzer API as an Error even After Converting the file into base64.  
Please help.

 ![uoiuiouououio](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/f/7f57ea7181de296458a9aec5fc8246d0c2de4f21.png)  
 ![oluiuluio](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/f/1fead3a984ad9b6f70098f615df76a0f47af2894.png)

---

<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:** [April 21, 2023, 5:08am UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/2 "2023-04-21T05:08:37Z")

</div>

You’re complicating things by adding a web viewer. Can you use a text block (string) as the value for the ~~source\_image\_file~~ \* property and take this out of the web viewer event block? When you do that, what error do you get?

\*The documentation shows that the property you need to use with base64 strings is **source\_image\_base64**.

---

<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:** [April 21, 2023, 5:30am UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/3 "2023-04-21T05:30:36Z")

</div>

The same Error was Showing

 ![iyuiyuiyuiyui](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/d/4da263fe3160a57fc551eb28fb069e3473d2a52c.png)  
 ![tytytjytjtyjtyjty](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/d/ed6cae1dbdb3a2b64bad545bfe1c15490b9056d0.png)

---

<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:** [April 21, 2023, 12:53pm UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/4 "2023-04-21T12:53:41Z")

</div>

> [@pacecode](#):
>
> The same Error was Showing

Have you looked up error code 1003?

The documentation refer to **F** option in cURL but you are not reflecting it

```auto
curl -H 'API-KEY: YOUR_SLAZZER_API_KEY'
           -F 'source_image_file=@source_image_path'
           -f https://api.slazzer.com/v2.0/remove_image_background
           -o output.png

```

This means you have to emulate **data form filling**.

**[Edit]**

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/6/e6b6bc97638971b75409ed528b438ba564f3e0ae.png)  
This is from the website of `slazzer`. It requires a **Content-Type** of **multipart/form-data**

---

<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:** [April 21, 2023, 2:39pm UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/5 "2023-04-21T14:39:12Z")

</div>

Can you please give me Code for the Request Body?

---

<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:** [April 21, 2023, 2:49pm UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/6 "2023-04-21T14:49:23Z")

</div>

This topic is long but the last part of it deals with using a data property with two different methods, one of which uses url=: [Trouble Using WhisperAPI](https://community.thunkable.com/t/trouble-using-whisperapi/2241275)

---

<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:** [April 21, 2023, 5:33pm UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/7 "2023-04-21T17:33:51Z")

</div>

> [@pacecode](#):
>
> Code for the Request Body?

Please follow the instructions in the **API Reference** in the website. It clearly said you need to add multipart to your header.

---

<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:** [April 21, 2023, 6:33pm UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/8 "2023-04-21T18:33:55Z")

</div>

I know it can feel like we know the answer and we’re just not telling you. It’s not that! It’s that POST API calls are complicated, especially when adding a file. And it would take a while to set up and test all of this on our end, especially since we don’t have an API key to use. So we’re left providing suggestions but @muneer is right and if you check the link to the topic I provided, you should be able to piece together a test. And then post new screenshots or a link to your project and we’ll go from there.

---

<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:** [April 22, 2023, 11:06am UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/9 "2023-04-22T11:06:47Z")

</div>

Error again

 ![jmjhklylyul](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/8/0802a10341b54b1584327c9026da5d51ac3f8c28.png)

 ![yuuyiyiyiyuiyuiyui](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/2/52968740183a26901aff83ccc6c02f1ffc7c372a.png)

---

<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:** [April 23, 2023, 6:46pm UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/10 "2023-04-23T18:46:47Z")

</div>

> [@pacecode](#):
>
> Error again

I van see two issues

1. You are using a block to get the URL of a file but the option says `source_image_base64` which is not the correct option. Also remember if you use the url option then it will not work with files from your computer or mobile device. You have to use a fully qualifies names such as url that starts with `http://`.

2. The body of the Web API is not a JSON object and you should not use `create object` or `generate JSON from object`. You should use the text style suggested by the API document.

---

<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:** [April 24, 2023, 11:27am UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/11 "2023-04-24T11:27:00Z")

</div>

How Do I Add INPUTS in text Style? Please Explain.

---

<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:** [April 24, 2023, 11:33am UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/12 "2023-04-24T11:33:44Z")

</div>

> [@pacecode](#):
>
> Please Explain.

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

---

<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:** [April 24, 2023, 12:06pm UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/13 "2023-04-24T12:06:40Z")

</div>

Same Error

 ![tyututytyu](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/8/482bf489c1d99385861e20ef38f580a75b0ad449.png)  
 ![ytuututyutyu](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/7/67002b260fbbd5403aa0bb5dfe909ead6a521b93.png)

---

<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:** [April 24, 2023, 12:15pm UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/14 "2023-04-24T12:15:48Z")

</div>

Use `application/x-www-form-urlencoded` as the content type and try

---

<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:** [July 23, 2023, 12:15pm UTC](https://community.thunkable.com/t/errors-while-working-on-slazzer-api/2383382/15 "2023-07-23T12:15:50Z")

</div>

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