Struggles with deployment, object storage, and database

Q: I have a repl that is supposed to function as an API, and I’m trying to allow users to pull data through this API. However, in order to restrict access to permitted users, I need to have either an object or database for storing API keys. Each key is supposed to have a “count” that can be updated with each use (for rate limiting purposes) and a series of endpoints (to limit access of certain users to certain parts of data). However I’m running into multiple issues:

  1. When I try to use the database feature, I am not able to import the module. I have replit 4.0 updated in the environment, but the db module still wont load.
  2. When I try to use object storage, the object will not update the count – even when I get data from the API (which is supposed to update the object in object storage).
  3. I’m only able to access one of the endpoints, and despite some API keys having access to the other endpoints per my list of keys – they are still getting “Forbidden” errors as if they don’t have permission.
  4. When I end the deployment or stop running the API script on Replit, I am still able to make API calls. This is the most worrisome of all. I haven’t hosted this anywhere else so I am thoroughly confused as to how I am still able to pull data with my API pulling script.

I can share some of the code if necessary, but was wondering if anyone else had issues with either: 1) A lingering deployment, 2) Object storage not updating, or 3) The database not importing even with an updated Replit Package.