Managing User Accounts
Last updated
Was this helpful?
Since your BetterForms web users are stored in your helper file, you will need to add the helper file as an external data source for your legacy FileMaker file. This will allow you to run the API scripts provided in the Helper file that help manage users.
Download the BetterForms Demo file for an example FileMaker script that shows you how to call the User API script
All of the requests below will refer to the user object, which is simply the expected JSON object expected by this API script to represent a user.
{
"id": "",
"email": "", //user's email address
"avatar": "", //URL to an image to be used as an avatar
"isEnabled": true,
"isVerified": true
}To create a new user, simply pass a JSON object without an id key. isEnabled and isVerified will default false if not set.
The script will return the full object of the user, which will include its new id.
To read a user's details, pass in ONLY the id key. No data will be updated, but the full user's object will be returned.
To update a user, pass in any key(s) that you want to update AND the id of the user.
To delete a user from the Helper file, pass the user's id AND an additional isDelete flag set to true.
Use the Error.isError custom function to check the script result and ensure that is ran properly.
Last updated
Was this helpful?
Was this helpful?