I know how to set up authentication for an API workflow, but I couldn’t figure out how to require authentication with a private key for a general data endpoint like this: https://appname.bubbleapps.io/api/1.1/obj/type_name
Is this possible? If not, is there another easy way to get json from a data type thru an API workflow?
@romanmg Thanks for the help. In the link you sent me (Introduction - Bubble Docs) I noticed it said: “You can also add your API Token directly in the URL for both the Workflow and the Data API as a querystring parameter api_token. This approach is not recommended as it is less secure.”
But, if I enable “This app exposes a Data API”, anyone with the URL would be able to access the data. I only want the data to be accessible if the URL has the proper api_token.
Do I have to edit something in the privacy tab for my data types?
Yes, that’s exactly why I mentioned the Privacy tab earlier. If you expose for a key, you expose for everyone by default, so you need to create rules so that your data is locked down when accessed without the token. A good place to start would be creating rules for logged out users and users that aren’t related to the data types in question.
The API key bypasses these rules, so the rules are for “everyone else.”
Do you know how this would work for users that are using “Login with Social” + the Google plugin?
I’m trying to figure this out for some hours now and I’m stuck.