Can i use privacy rules for Data API?

Hi, I want to know if i can use privacy rules for Data API? If Yes, than how? The reason i asked is lets say my API Key got leaked, someone can get data from my database. Can privacy rules solve this issue?

Yes - read about it here https://manual.bubble.io/core-resources/api/data-api

If you’re making a call using a token obtained via a sign in call, or via the OAuth 2.0 flow, what you can see and do via the API is limited by the rules in the Privacy section of the data tab.

I’ve been playing with all 3 methods - API key, sign in and Oauth for authentication to the Data API - they all work.