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…??
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
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
Thanks @vishruth-ram appreciate you answering. i do need some clarification though
URL’s i clear - I guess it should be set in the “Set URL” Block
Then i Set one HEADERS block to APIKEY - This i also found
BUT
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?
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
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?
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…
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.
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…
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.
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.
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