AnsweredAssumed Answered

REST API - can't update snippets

Question asked by 57e078aca698a3bdc7ca4b849bb7b34c59ef362b on Apr 6, 2018
Latest reply on Apr 8, 2018 by Sanford Whiteman

I can do all sorts of stuff to Landing page and file assets through the REST API + cURL + PHP, but I've spent the day unsuccessfully trying to update snippet content.

 

I'm using the code on this page:

 

REST-Sample-Code/UpdateSnippetContent.php at master · Marketo/REST-Sample-Code · GitHub

 

With our credientials for $clientID, $clientSecret and $host.

 

It fails silently, output from print_r($snippet->postData());   is empty and there's no update to the snippet content.

 

If I dump the $url value, and copy / paste into a browser, I get the JSON for the snippet. This tells me the credientials, and snippet ID are correct.

 

Before I dig any further, does this actually work any more? Or maybe this feature has been quietly retired?

 

Thanks in advance...

 

 

Outcomes