Quantcast
Channel: Active questions tagged ampscript - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 359

Need help with HTTPPost call in ampscript

$
0
0

I have the following code

SET @CallStatus = ''set @JSON = HTTPPost("http://someapi/bgcenter/","application/json","a=getSubLists&m=10790742&o=j&e=sometest@email.com", @CallStatus)

I am trying to save this in a microsite, but it is not letting me giving me back a Forbidden 403 error. I assume It is because of the someapi (which I have changed for this demo), but I am unclear as to how to get this post to work. The urls for our webservice works, and gives us back JSON code, and HTTPPost and HTTPPost2 both seem to allow me to make this call, but I am unclear about the documentation without an example:

S3 The content to post to the specified URL S4 The output parameter used to contain returned HTTP status code from the HTTP POST request S5 Name of any additional headers to add to the HTTP POST request S6 Value of any additional headers to add to the HTTP POST request

So should I put my variables into a content string, or should I be adding them to the additional headers? And how do I get a POST to work to an outside third party webservice?


Viewing all articles
Browse latest Browse all 359

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>