PricingBlog

Learning toddle trying to get data in from airtable base and i keep getting "authenticated required"

  • yantso-1268210604099895428

    Yaniv Tsoref

    1 year ago

    I've put the acess token in and time and not sure what i'm doing wrong, would love some help... so i can build my first app 🙂
    1268210604213272762-Screenshot_2024-07-31_at_15.13.18.png
  • max.kayr-1268213703463932029

    Max

    1 year ago

    Can you share, where you place the Auth Token? And please blur the actual token so that we cannot see it 🙂
  • yantso-1268215012397158534

    Yaniv Tsoref

    1 year ago

    Sure @Max there it is
    1268215012208672788-Screenshot_2024-07-31_at_15.33.16.png
  • i tried with baerer and without 😦
  • patrickmast-1268216557004259360

    Patrick Mast

    1 year ago

    Side question. is the AccesToken exposed at the frontend doing it like this?
  • max.kayr-1268230136583557120

    Max

    1 year ago

    Yes.
  • max.kayr-1268230542395179120

    Max

    1 year ago

    If you do it that way, the access token will be exposed in the frontend. Meaning that all users can see the credentials in their browser dev tools. Unfortunately, there is no way to avoid this when you use airtable as a backend. Toddle will release a new API version soon that will allow secure access
  • max.kayr-1268230929814650962

    Max

    1 year ago

    @Yaniv Tsoref this will work if you remove the session token action and type in your token as the header of the API call as "Authorization: Bearer...". Set the auth method to no auth
  • max.kayr-1268231277710934066

    Max

    1 year ago

    But as I said, this won't be secure. To be honest, it is not a good idea to use airtable as a backend. It is so limited and has no user authentication/authorization system. I highly recommend you use a real Backend like Xano, Supabase...
  • yantso-1268231908291252295

    Yaniv Tsoref

    1 year ago

    Thanks @Max i'm trying to learn how things work, should i use "Authorization: Bearer..." on the header value as a string or split it in two name and value?
  • max.kayr-1268232278790897756

    Max

    1 year ago

    You split it. So name is "Authorization" and value is "Bearer...". Like in the Airtable docs
  • yantso-1268232613651419217

    Yaniv Tsoref

    1 year ago

    Thanks