Storing data from a JASON api endpoint in StoryBlok

Hi - Apologies for the brevity and if this post is in the wrong place… My background is product/project management.

I am trying to understand the best logic for the following use case.

I have a Real Estate CRM that stores my property data. This CRM has a JASON endpoint that lists all the properties that are avalible on my CRM in a common format.

On the front-end of my website I need to password protect a small segment of properties. Note: I cannot manage this from the CRM end point.

To keep my Jamstack website logic simple, and in the serverless way, and without having to build a 3rd part app on AWS/(some similar) I am trying to find a way to store this data in Storyblok. Then use Storyblok to apply some kind of flag (true/false, or 0/1) if a property record should require authentication on my front end application (Likely stack: Netlify & NextJs)?

I’ve been reviewing the Storyblok docs and I think this is possible using one of the API’s

Thanks, J

Hello @Jamie,

currently, the recommended way to achieve this is to use the app access token scopes (https://www.storyblok.com/apps/token_permissions) and restrict the access to some folders. Then in the frontend, you get the token that has access to the protected resources when getting after the login. The only thing that needs to be built by you is a backend endpoint for the login.

Best regards
Hannes

1 Like

Thanks Hannes, that was really helpful.

In terms of storing the data from my CRM JSON endpoint in Storyblok. What are your recommendations?

I see three possible options; Custom Applications, Field-Type Plug-ins, or Tool Plug-ins.

Which would you recommend? Each property record will contain around 80 fields of data (minimum 20 of these would be image URL’s).

Thanks,

J

Hello @Jamie,

you could take a look at a custom field type plugin as a solution for your use-case. It allows you to access external APIs using the code from this repository as the starting point: https://github.com/storyblok/storyblok-integration-field-starter

In the case that you need something that can do more than get content inside of a story at a time then you can also take a look at a custom application in combination with a custom field type plugin which will then only hold the data in the way you need.

Best regards
Hannes

1 Like