Gated content via external site via javascript API
Hi!
I'm building a site using react, and need to create a method to gate content based on a marketo form. I am using the forms 2.0 and have been able to return a form using the get command for forms.json via REST API endpoint reference for Forms
{
"id": 2740,
"name": "Dev Test",
"description": "",
"createdAt": "2019-11-25T17:20:58Z+0000",
"updatedAt": "2022-11-02T23:54:55Z+0000",
"url": "https://app-aba.marketo.com/XXXXXX",
"status": "approved",
"theme": "simple",
"language": "English",
"locale": "en_US",
"progressiveProfiling": false,
"labelPosition": "above",
"fontFamily": "Helvetica",
"fontSize": "13px",
"folder": {
"type": "Folder",
"value": 44,
"folderName": "Test Forms"
},
"knownVisitor": {
"type": "custom",
"template": "Welcome back, {{lead.FirstName}} {{lead.LastName}}<br/><br/>{{form.Button:default=Download}}<br/><br/>{{form.NotYou:default=Not you?}}"
},
"thankYouList": [
{
"followupType": "none",
"followupValue": null,
"default": true
}
],
"buttonLocation": 120,
"buttonLabel": "Submit",
"waitingLabel": "Please Wait",
"workSpaceId": 1
}
My problem is that I do not know / cannot find documentation on how to know if a person has filled out a specific form using the API. Beforehand we were just using redirects to a webinar page and sometimes known visitor HTML, but I would like to not allow anyone to view the gated content if they have not filled out the form but were forwarded that page if that page is not a marketo landing page.
Is there a cookie or API call that marketo has that references if a person has filled out a specific form or am I better off creating a cookie/using local storage from the front end on successful form submit and referencing that instead? Only concern I have going that method is that if someone knows the cookie it could be easily spoofed. I could be missing something in the documentation but I just cannot find it myself.
Thanks in advance!