Asked by Troy on September 18, 2024
Can I add user accounts (email/password) so each user can only PUT/GET/DELETE their own data? Do I need to add email and password fields, and how do I implement this?
Answered by Twidget
Yes. Add a field to your datastore to store the user's _id when saving data. Then filter GET, PUT, and DELETE operations so they only affect records that match the authenticated user's id. This enforces per‑user access control.
Custom functions, password validation, and data aggregation
You can create reusable custom functions through the no‑code builder. These functions can perform validations such as password complexity checks.
Data returned from the datastore can be manipulated and aggregated as needed within your endpoints or functions.
See the custom functions t...
Pushing game results between non‑WordPress and WordPress sites
Yes, if both Site A and Site B expose APIs. Use Twidget to retrieve results from Site A and push them to Site B’s API. You can configure an event to poll periodically or have Site A call your Twidget endpoint to trigger the update in real time.
Saving HTTP response images into the database
Follow the tutorial for sending an HTTP request and retrieving image data: https://www.youtube.com/watch?v=IrY_7xnA10g&t=1s
Use the Upload File command to save the image bytes into the datastore.
Aggregating events from multiple sources into a calendar
Yes. Twidget can aggregate events from platforms whose APIs are accessible (Google Calendar, Meetup, Facebook, etc.) and serve that data to your website or event plugin.
Outputting custom JSON and referencing row values
Make sure you reference variables using the proper variable type (not as literal text). Use the platform variable reference (the variable picker/type) so the JSON template injects the actual value rather than a literal string.