# How to link Ximiliar app to Thukable

**URL:** <https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704>\
**Category:** Questions about Thunkable X\
**Created:** [March 31, 2022, 2:45am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704 "2022-03-31T02:45:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsturm3605jl](https://avatars.discourse-cdn.com/v4/letter/g/b77776/32.png) [@gsturm3605jl](https://community.thunkable.com/u/gsturm3605jl)\
**Post date:** [March 31, 2022, 2:45am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/1 "2022-03-31T02:45:59Z")

</div>

Hello I am having trouble figuring out how to use the Web ApI. I am trying to link a recognition app from Ximilar to thinkable but im not sure what to do

---

<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:** [March 31, 2022, 4:39am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/2 "2022-03-31T04:39:46Z")

</div>

You can watch my tutorial video here:

> [@API JSON Tutorial (Video)](https://community.thunkable.com/t/api-json-tutorial-video/1140575):
>
> Using APIs in Thunkable and understanding how to parse JSON to get certain data from the API response is both a popular and a difficult aspect of using Thunkable. It’s not so much difficult because of Thunkable but because every API url format is different, every API documentation is different, every JSON response is different, etc. In this video, I spend a lot of time talking you through some best practices. It’s not a quick tutorial because if you rush through setting up an API in Thunkable, …

If you have any trouble, post the API url you’re using and provide some more details about what you’re trying to do.

---

<div class="post-metadata">

**Author:** ![gsturm3605jl](https://avatars.discourse-cdn.com/v4/letter/g/b77776/32.png) [@gsturm3605jl](https://community.thunkable.com/u/gsturm3605jl)\
**Post date:** [April 1, 2022, 12:23am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/3 "2022-04-01T00:23:10Z")

</div>

So within the first 2:30 minutes in the Ximilar app is something that you have to log into instead of being an open site. Unlike your example where it is open to the public, does this make this process not able to happen or do I have to do something different?

I did however come across:  
curl -H “Content-Type: application/json” -H “authorization: Token **API\_TOKEN** ” [https://api.ximilar.com/your-endpoint](https://api.ximilar.com/your-endpoint) -d ‘{“records”: [{"\_url": “ **SOME\_URL** ” }, {"\_base64": “data:image/jpeg;base64,/9j/4A…”}] }’  
Although when I use the [api.ximilar.com](http://api.ximilar.com)… it comes up as default backend - 404

---

<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 1, 2022, 12:36am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/4 "2022-04-01T00:36:17Z")

</div>

Do you have your own token for this service?

There are two ways to provide the headers (-H in cURL syntax). Either as part of `Web API` header block or in the `Web API` setup screen.

You need to provide both `Content-Type` and `authorization` as instructed.

---

<div class="post-metadata">

**Author:** ![gsturm3605jl](https://avatars.discourse-cdn.com/v4/letter/g/b77776/32.png) [@gsturm3605jl](https://community.thunkable.com/u/gsturm3605jl)\
**Post date:** [April 1, 2022, 12:40am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/5 "2022-04-01T00:40:26Z")

</div>

Yes it comes with: a token and ID and it is JSON

---

<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 1, 2022, 12:42am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/6 "2022-04-01T00:42:36Z")

</div>

Good,  
Next is to determine the **end-point** you should use to add it to the website address and then to use the last part to point to where your image resides.

---

<div class="post-metadata">

**Author:** ![gsturm3605jl](https://avatars.discourse-cdn.com/v4/letter/g/b77776/32.png) [@gsturm3605jl](https://community.thunkable.com/u/gsturm3605jl)\
**Post date:** [April 1, 2022, 12:48am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/7 "2022-04-01T00:48:35Z")

</div>

Alright so when In thunkable when I click Web api another screen pops up and it asks for the URL,Query parameters, Body, Header( Property, value). Im not too sure on the actual URL to use, I believe I skip the Query and body and within the header I added an authorization and content type. IS this correct so far?

---

<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 1, 2022, 12:53am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/8 "2022-04-01T00:53:57Z")

</div>

> [@gsturm3605jl](#):
>
> header I added an authorization and content type. IS this correct so far?

Yes, this is correct.

---

<div class="post-metadata">

**Author:** ![gsturm3605jl](https://avatars.discourse-cdn.com/v4/letter/g/b77776/32.png) [@gsturm3605jl](https://community.thunkable.com/u/gsturm3605jl)\
**Post date:** [April 1, 2022, 1:34am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/9 "2022-04-01T01:34:36Z")

</div>

I received this error. How do I get around this? I believe I inserted everything else correctly?  
WWW-Authenticate: Token

{  
“detail”: “Authentication credentials were not provided.”  
}

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [April 1, 2022, 2:25am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/10 "2022-04-01T02:25:46Z")

</div>

you have to include these n your headers:

```auto
> Content-Type: application/json
> Authorization: Token 1af538baa90-----XXX-----baf83ff24

```

note - the authorization must be entered exactly as shown “Token” followed by space then YOUR API

---

<div class="post-metadata">

**Author:** ![gsturm3605jl](https://avatars.discourse-cdn.com/v4/letter/g/b77776/32.png) [@gsturm3605jl](https://community.thunkable.com/u/gsturm3605jl)\
**Post date:** [April 1, 2022, 2:57am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/11 "2022-04-01T02:57:55Z")

</div>

These are included. im having trouble with what the url should be within the api. I was trying to reproduce what tatiang did in his video @ 3:32 and I cannot get this to happen.

---

<div class="post-metadata">

**Author:** ![gsturm3605jl](https://avatars.discourse-cdn.com/v4/letter/g/b77776/32.png) [@gsturm3605jl](https://community.thunkable.com/u/gsturm3605jl)\
**Post date:** [April 1, 2022, 3:38am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/12 "2022-04-01T03:38:10Z")

</div>

I might have gotten it correct but now im seeing " invalid character in header field name “Content Type”

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [April 1, 2022, 3:44am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/13 "2022-04-01T03:44:02Z")

</div>

maybe it should be Content-Type  
shpw us a picture of your header and url blocksa

---

<div class="post-metadata">

**Author:** ![gsturm3605jl](https://avatars.discourse-cdn.com/v4/letter/g/b77776/32.png) [@gsturm3605jl](https://community.thunkable.com/u/gsturm3605jl)\
**Post date:** [April 1, 2022, 3:48am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/14 "2022-04-01T03:48:27Z")

</div>

![Screen Shot 2022-03-31 at 11.47.33 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/f/cf4deb42132a76e320e70a20f93d87713ed1a73a.jpeg)  
 ![Screen Shot 2022-03-31 at 11.47.48 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f2ac2c7b2b85fb28e62fdd28811c6b64354a451.jpeg)

---

<div class="post-metadata">

**Author:** ![gsturm3605jl](https://avatars.discourse-cdn.com/v4/letter/g/b77776/32.png) [@gsturm3605jl](https://community.thunkable.com/u/gsturm3605jl)\
**Post date:** [April 1, 2022, 3:49am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/15 "2022-04-01T03:49:57Z")

</div>

so adding the dash made it go to the correct spot but as soon as it works…

 ![IMG_8401](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/0/9044f56815321d0b3fe322a62fe54f738ba08d73.jpeg)

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [April 1, 2022, 3:50am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/16 "2022-04-01T03:50:33Z")

</div>

for starters, your url (after building the parts together) resut in a double slash (//) between “.com” and “v2” (see set webapi url block)

---

<div class="post-metadata">

**Author:** ![gsturm3605jl](https://avatars.discourse-cdn.com/v4/letter/g/b77776/32.png) [@gsturm3605jl](https://community.thunkable.com/u/gsturm3605jl)\
**Post date:** [April 1, 2022, 4:16am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/17 "2022-04-01T04:16:16Z")

</div>

I deleted the one [after.com](http://after.com)  
not sure if it made a difference

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [April 1, 2022, 4:30am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/18 "2022-04-01T04:30:58Z")

</div>

if you’re asking ximilar to do recognition and classification i suposse you have to pass the image you want it to process. you have to use another option of set\_webapi - which is body, then set it to something like this:

```auto
> { 
> "records": [
> { "_id": "2342", // (note that it's a string)
> "_url": "https://example.com/my_image.jpg",
> "product_id": "unique product string",
> "my_category": "customer category",
> "product_price": 32.5,
> "my_tags": ["one", "two", "three"]
> }
> ]
> }

```

at the minimum, suppy an id and url.  
i’m just going by what their website is saying ([First Steps, Auth & Images - Ximilar API](https://docs.ximilar.com/quickstart/first_steps/))

do you have an image to test with? you will need to add a block like this after headers:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/3/83b550114edf1501f0d2799b7e14b43710d18ec0.png)

(untested)

or use the method you mentioned - of using a base64 version of the image

---

<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 1, 2022, 6:37am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/19 "2022-04-01T06:37:23Z")

</div>

> [@manyone](#):
>
> then set it to something like this:
> 
> ```auto
> > { 
> > "records": [
> > { "_id": "2342", // (note that it's a string)
> > "_url": "https://example.com/my_image.jpg",
> > "product_id": "unique product string",
> > "my_category": "customer category",
> > "product_price": 32.5,
> > "my_tags": ["one", "two", "three"]
> > }
> > ]
> > }
> 
> ```
> 
> at the minimum, suppy an id and url.

A block representation of this would be

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

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [April 1, 2022, 6:40am UTC](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704/20 "2022-04-01T06:40:52Z")

</div>

although the body can be represented as a string, this method is the prescribed way of encoding the body of webapi request.

[Next page](https://community.thunkable.com/t/how-to-link-ximiliar-app-to-thukable/1810704.md?page=2)
