Hi all,
I created a Softr database and put a special token for being able to call a rest api and having for each users their own datas.
The token is mandatory in the “Headers” for retrieving the datas when I call the API of the application that I want.
I first tried to create the Rest API as per the documentation, but sounds that the Headers param, don’t allow to use LOGGED_IN_USER field. Is that correct?
Doing something like this? I tried, but it failed.
So, I decided to do my own api call app and passed my token through an URL parma and placeholders. Like below.
Had my schema, but nothing in Transformed Json or Raw Json. Normal?
I decided to go ahead. I applied my rest api to the content. Like below. I was able to see the my clients.
But when I click on “Preview” or to publish the application, I am getting a 422 error.
Did I miss something???
I tried then to check the datas via a custom code block based on this link
(Custom script to preview the user data in a custom code block)
Then, I decided to use custom code block to display the response from my api (my list of clients). And that worked.
Question is : What I missed? How to use Softr interface to display my list correctly in their widgets? Do I need to rest like this, delete all the Softr content and use the custom code block to create my own application (That sound not good, but we never know).
Any suggestions?
Thanks