# How can I connect Thunkable with Supabase

**URL:** https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900
**Category:** Questions about Thunkable X
**Created:** [September 26, 2023, 4:04pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900 "2023-09-26T16:04:48Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [September 26, 2023, 4:04pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/1 "2023-09-26T16:04:48Z")

</div>

Hello - I am wondering if some one can build two example blocks to me -  
One to connect to the supabase DB  
And  
One how to Post one datapost to a table  
I am just trial and error all the time and thats because i do not understand the code presented to use.  
How do i set up URL and REF ID etc to connect  
And when connecting how to update a record.

That would do it…  
@jared @tatiang or someone else who can help…??

Thanks in advance…

No Tips?

---

<div class="post-metadata">

### Author: ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)
#### Post date: [September 28, 2023, 2:10pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/2 "2023-09-28T14:10:52Z")

</div>

@stefansladdeneng1 Can you share what blocks you have tried so far?

This is likely a [web API](https://docs.thunkable.com/blocks/advanced-app-features/web-api) setup, yes? Gathering any API documentation from Supabase will be important.

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [October 1, 2023, 2:23pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/3 "2023-10-01T14:23:02Z")

</div>

Sorry Matt - Been away for a few days.  
The thing is @matt_conroy that; I tried a million versions so i even dont know whoich of the to send to you. I would really suggest to Thunkable to make a real difference here.  
Build example blocks to connect and an example on how to build a search querie for the databases one can use. If and when such example exist it would be much easier for us non coders to understand how to… and we can focus on the actual development.

Again - i honestly dont know exactly what to send…  
I hope you can help somehow…  
Stefan

---

<div class="post-metadata">

### Author: ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)
#### Post date: [October 2, 2023, 7:20am UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/4 "2023-10-02T07:20:37Z")

</div>

For the table you want, click the `</> API` button and paste the URL into thunkable. We’ll have two headers, one with the parameter `apikey` with the value of your key from the gear icon from the dashboard. The other one is `Authorization` with the value `Bearer KEY`  
Note: Replace `KEY` with the value of your key from the gear icon from the dashboard.  
RESPONSE: JSON List of objects

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [October 2, 2023, 5:12pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/5 "2023-10-02T17:12:04Z")

</div>

Thanks @vishruth-ram appreciate you answering. i do need some clarification though 😃

1. URL’s i clear - I guess it should be set in the “Set URL” Block

2. Then i Set one HEADERS block to APIKEY - This i also found  
BUT

3. The Bearer Key i do not understand…  
First: Where do i find that? Cannot find anything mentioned as a BEARER KEY  
Secondly: When i have found it - Where do i Put it in Thunkable? In what block?  
The HEADER block is already set. is it BODY or?

4. Finally, i have set a PWD when i created the SUPABASE DB - Where shall i use that? (If i should

Extremely grateful for an explanation here  
Thank you 🙏 🙏 🙏

---

<div class="post-metadata">

### Author: ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)
#### Post date: [October 3, 2023, 11:34am UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/6 "2023-10-03T11:34:06Z")

</div>

> [@stefansladdeneng1](#):
>
> Cannot find anything mentioned as a BEARER KEY

Type `Bearer` as the value and a space and enter your normal API key

---

<div class="post-metadata">

### Author: ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)
#### Post date: [October 3, 2023, 11:44am UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/8 "2023-10-03T11:44:31Z")

</div>

_Note: Please copy the URL from the table’s get code button in the “bash” language, not the settings page._

---

<div class="post-metadata">

### Author: ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)
#### Post date: [October 3, 2023, 11:46am UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/9 "2023-10-03T11:46:46Z")

</div>

> [@stefansladdeneng1](#):
>
> The HEADER block is already set

Are you using DnD or StP?  
For DnD: Click the Gear Icon beside the API name. See the HEADERS section.

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [October 3, 2023, 4:46pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/10 "2023-10-03T16:46:42Z")

</div>

Doing StP in this app

So you mean  
“URL” should be set to “postgresql://postgres:[YOUR-PASSWORD]@db.nttwarkfrrlbsxxtvkmf.supabase.co:5432/postgres” (where i change the password to the correct one in the url)

“HEADERS” should be set to “BEARER APIKEY”  
Is this correct?

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [October 3, 2023, 5:24pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/11 "2023-10-03T17:24:18Z")

</div>

I cant get in contact with the DB  
Using standrd SQL i can update a row in the DB from the SQL window in Supabase…  
But i cant connect and therefore i dont know uf the SQL statement working from Thunkable blocks…  
Perhaps this image will help you to help me…

 ![Thunkable 2023-10-03 19-25-47](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/9/199fa60556d6029e1b9ea744ce70e8030d9956b8.jpeg)

---

<div class="post-metadata">

### Author: ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)
#### Post date: [October 4, 2023, 12:16pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/12 "2023-10-04T12:16:31Z")

</div>

Password shouldn’t be used

---

<div class="post-metadata">

### Author: ![vishruth-ram](https://avatars.discourse-cdn.com/v4/letter/v/82dd89/32.png) [@vishruth-ram](https://community.thunkable.com/u/vishruth-ram)
#### Post date: [October 4, 2023, 12:32pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/13 "2023-10-04T12:32:57Z")

</div>

> [@stefansladdeneng1](#):
>
> “postgresql://postgres:[YOUR-PASSWORD]@

No need just https:// and [url]/v1/[table name]. And it isn’t good to expose API keys and URLs like that. There is no need for query parameters too. Use a `create-object` block to create both the `apikey` and `authorization` headers. I don’t know how to create a row with the REST API but use the `Supabase. GET` block to get all the rows.

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [October 4, 2023, 1:09pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/14 "2023-10-04T13:09:52Z")

</div>

Thanks - I know its not best practice to share it like that. However since i have just started i can “redo” it and change pwd…But thanks - OK ill go wityh the creat block and see if i can get any progress in this drama… Thanks… Stay tuned…for some more result…

---

<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: [October 4, 2023, 10:54pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/15 "2023-10-04T22:54:42Z")

</div>

You’re definitely using the wrong approach.

Please check out these docs thoroughly

> **[REST API | Supabase Docs](https://supabase.com/docs/guides/api)**
>
> Auto-generating REST API.

Getting records could look like this

`GET https://[REF].supabase.co/rest/v1/countries?select=id,name,cities(id,name)`

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [October 8, 2023, 10:08am UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/16 "2023-10-08T10:08:05Z")

</div>

Struggling with connecting and get/post data to Supabase DB…However i think i get closer and closer.  
Now i get this message:  
{“message”:“No API key found in request”,“hint”:“No `apikey` request header or url param was found.”}  
I know the url is correct and so is all the values for properties.  
In other words, i have URL, I have APIKEY, I Have AUTHORIZATION but still i get the error message.

Anyone? @jared maybe?  
Thanks in advance…

(FYI: Image is showing only part of “an bearer keys”

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

---

<div class="post-metadata">

### Author: ![steve\_synopsis](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@steve\_synopsis](https://community.thunkable.com/u/steve_synopsis)
#### Post date: [October 8, 2023, 1:12pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/17 "2023-10-08T13:12:50Z")

</div>

Have you tried running it in Postman?

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [October 8, 2023, 1:15pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/18 "2023-10-08T13:15:16Z")

</div>

Hi - I am really open to anything after trying for a week now…  
but i dont know Postman… Can you give an example…or direct me?

---

<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: [October 8, 2023, 2:39pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/19 "2023-10-08T14:39:08Z")

</div>

Your object is configured like this:

Property: Content-Type  
value: application/json

But it needs to be like this:  
Content-Type: application/json

An object has property:value pairs that are defined horizontally on a single line but you’ve named the properties all “Property” or “value” as if they are read vertically.

You can see an example of this in the documentation: [Setting Headers | Thunkable Docs](https://docs.thunkable.com/blocks/advanced-app-features/web-api/no-auth-apis/setting-headers#setting-api-headers)

---

<div class="post-metadata">

### Author: ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)
#### Post date: [October 8, 2023, 2:53pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/20 "2023-10-08T14:53:17Z")

</div>

Yep - Got it - actually i discovered that earlier.  
The thing is that it say it is missing apikey, Authorization in the request url  
And i dont get thet. The URL it self is kind of neutral apart from the project name. Then i used the headers to assign  
apikey: The key  
Authorization: Bearer + The Key  
Content-Type: application/json  
But nothing works - I even user the template and also the blocks - several different times - BUT  
No Success…  
Any other brilliant ideas… I did build qwith APIs before and DBs but this seems to be really complex… OR … i just dont see it… ;-D

---

<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: [October 8, 2023, 2:55pm UTC](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900/21 "2023-10-08T14:55:54Z")

</div>

If you post an updated screenshot with the object fields fixed, someone may be able to help. I’m not sure what else to suggest for your setup.

You may not need an “apikey” property:value pair since it’s included in the “Authorization” property:value pair.

@matt_conroy Can you merge this topic with [How can I connect Thunkable with Supabase](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900) since it’s a continuation of that discussion?

[Next page](https://community.thunkable.com/t/how-can-i-connect-thunkable-with-supabase/2614900.md?page=2)
