I try to find a suitable way to retrieve files uploaded via forms.
To my knowledge there is no (documented) way to pull a file via the Mautic API.
I currently set it up the following way and failed:
- get a system web hook for form submission (as the web hook from the form is missing important submission data)
- retrieve the submission ID and file name from the web hook
- generate the URL for the file (which is the Mautic URL + “/forms/results/file/XX/file”, where XX is the submission ID)
- generate an https request with basic authorization in the header
However, I always get an 403 in response (cURL confirmed this as well).
So is the authentication always based on cookie? I can’t authorize an HTTP request within the header of the request?
Is there any other way I didn’t see?