Change Password for FileMaker Account via PHP API

Recommended Posts

I have a site which uses FileMaker accounts to access the site and everything is working well. I now need to give users the ability to be able to change their passwords via the site. I know there's no native method for this and FileMaker Inc recommend that "By default, web users cannot change their account passwords from a web browser. You can enable this feature for a database using the Change Password script step, which allows web users to change their passwords from browser.".

I can use newPerformScriptCommand to perform a script that has the Change Password script step - I'm just not sure how to pass the value for the "current password" and "new password" which will be entered by the user in a form. Can you pass multiple parameters to the FileMaker script using newPerformScriptCommand - as far as I can tell you can only pass one parameter.

If anyone can point out how to perform a FileMaker script that has the Change Password script step with the values for the current/new password that would be great. FileMaker Inc obviously support it as they mention this in the PHP API PDF docs but don't give anymore details about how to construct this.

Share on other sites

along with:
Set Variable [$oldpwd; Value: GetValue ( Get (ScriptParamter) ; 1)]
Set Variable [$newpwd; Value: GetValue ( Get (ScriptParamter) ; 2)]
to get the old and the new passwords for use with the Change Password script step.
I've been testing this and it's working well, however I've just been testing it with invalid current password values and it's not failing as expected. Looking at the Admin Console log viewer the script is generating an error as expected ("wpc1 Web Scripting Error: 213 Script: "Change Password Web", Script Step: "Change Password") but the script error isn't being captured.
The relevant part of the code looks like this:

Hi,
I want to access a data base «Import.fmp12» hosted on FMS 16 with the new Rest API but cannot get it to work.
Testing with «ARC Plugin for Chrome» (great tool, btw) and Postman.
In ARC, I get the error 802 – Unable to open file; in Postman, I won't even get that far: «Could not get any response»

This is what I did so far:
– The file is accessible fine with any FileMaker client using FileMaker username and password (triple checked spelling, etc.)
– Can connect fine to WebDirect with any browser and http
– Cannot connect using Rest API and http, so went for https
– Got an authentication error with https, so
– Installed a self-signed certificate both on the server Mac and on local Mac for my myowndomain.com
Getting mixed results:
– Firefox: myowndomain.com certificate: Error code: SEC_ERROR_UNKNOWN_ISSUER (to be expected)
– Safari: FMI Default Certificate: Certificate not valid (host name mismatch). For whatever reason, Safari doesn't use my certificate.
– Chrome: strikethrough https but shows the WebDirect server
– ARC Plugin: Using https://myowndomain.com/fmi/rest/api/auth/Import Can get now through to the server (no SSL-Auth problems anymore), but the result is: {"errorMessage": "Unable to open file","errorCode": "802"}
– Postman: Using https://myowndomain.com/fmi/rest/api/auth/Import «Could not get any response» and an error message: «{"errorMessage":"Method Not Allowed"}»

XML error: No memory at line 1
Greetings, this error occurred when the Filemaker API cannot generate a bunch of records. (1000+ records and above)
I've adjusted the time out settings for PHP even the memory limits.
Is there any possible solution for this?

According to some information, the error turns out that the 10 MB XML scripts is unchangeable.
thanks.

I am tasked with troubleshooting a web registration form that queries a Filemaker Pro v12 database via a Filemaker PHP API.
The web form had been running well for a couple of months after major revision, when all of a sudden:
All dropdowns are empty
All radio buttons are missing
These symptoms appear to be browser-independent.
The appearance of these symptoms is mysterious:
Nobody has modified the PHP code for the web form - I've done a compare with a backup done at the time when the web form was not broken and it is identical to what is currently on the server.
The Filemaker Pro layout that the web form is querying is just fine - all the value lists for the dropdowns and radio buttons are present.
I've created a stripped-down version of the web form: https://campmeetings.cccsda.org/test_form.php and I've also attached the php source code file.
The date and record fields are populating correctly. Notice the empty dropdown list after "Church I attend."
Could this be caused by an incompatibility between the FMP PHP API and PHP libraries on the server? Perhaps due to a PHP update on the server? Any ideas how to troubleshoot this?
test_form.php

Hi. I am trying to script the getting of some data from a website that has an API. I have BaseElementsPlugin and was given an example bit of code by the website:
data = {'domain': domain, 'include_generic': True}
headers = {'X-Api-Key': 'xyz123'}
resp = requests.post('https://api.anymailfinder.com/v3.0/search/domain.json', data=data, headers=headers)
I have never dealt with this kind of programming and am not even sure where this info would go or what script step(s) I would use to call this. Is this CURL? Are you aware of sample FM scripting that I could use as a model to figure this out?
Thanks for any help with this!