Question
Making a REST API Call
Hey there,
I'm trying to pre-fill a form on a non-marketo page but my javascript skills are not strong.
I found these instructions: http://developers.marketo.com/blog/external-page-prefill/
But they leave alot of steps out of the process.
I've been able to form the URL which requests an access token, but I don't know how to code the request.
None of the sample code in the dev pages is working for this purpose.
Once I obtain the access token I'll be inserting it into another URL which also contains the visitors cookie ID.
I'll be making another API call using this new URL to grab the data we need to prefill the form.
I've been able to insert the cookie ID into the URL and I shouldn't have any issue inserting the access token once it's been obtained, but again after I've formed the URL, I'm not sure how to code the call so I can get the fields I can use to prefill the form.
Can someone tell me how I make the API call in javascript?
I'm trying to pre-fill a form on a non-marketo page but my javascript skills are not strong.
I found these instructions: http://developers.marketo.com/blog/external-page-prefill/
But they leave alot of steps out of the process.
I've been able to form the URL which requests an access token, but I don't know how to code the request.
None of the sample code in the dev pages is working for this purpose.
Once I obtain the access token I'll be inserting it into another URL which also contains the visitors cookie ID.
I'll be making another API call using this new URL to grab the data we need to prefill the form.
I've been able to insert the cookie ID into the URL and I shouldn't have any issue inserting the access token once it's been obtained, but again after I've formed the URL, I'm not sure how to code the call so I can get the fields I can use to prefill the form.
Can someone tell me how I make the API call in javascript?