Questions tagged [httppost]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
41 views

Problem with sending files through HttpRequest

I'm getting problems when try to send files larger than 3MB (aproximated) to third-party through HttpRequest in a Integration Apex Class. This third-party tell us than they received the request but ...
Alex López's user avatar
0 votes
1 answer
605 views

How to use HTTP Callout action in Flow with body of Content-Type: application/x-www-form-urlencoded

I am trying to setup an authorization step using the HTTP Callout feature in FLOW. The authorization endpoint I am getting my token from needs to receive the body payload as application/x-www-form-...
Jay Herrera's user avatar
0 votes
0 answers
58 views

POST works in Postman, doesn't work with HTTPPOST2

I'm trying to troubleshoot but I'm struggling. It code below works in postman, but not in the ampscript function: Set @req_url = "[URL]" Set @content_type = "application/json" Var ...
en-rep's user avatar
  • 25
0 votes
1 answer
58 views

I cannot find the post method when doing a httpcallout through flows

I am trying to convert an opportunity to sales agreement through HTTPCallOut Action using flows and it does not give me an option to select the POST method, it only has the GET method. I created a ...
bb21's user avatar
  • 1
0 votes
1 answer
142 views

SSJS API Call - Unable to retrieve security descriptor for this frame

I have this API call, for shortening a link through API, which I got to work in Postman: I want to make the exact same call from an email in Marketing Cloud, and I'm using this script, which I have ...
Nikolai Hvid's user avatar
1 vote
1 answer
148 views

Can I receive a Twilio http POST webhook as Salesforce Integration User?

I have experience receiving data in Salesforce from Twilio via an incoming http POST/GET. If the receiving Apex class fires a Platform Event, which in turn triggers a Flow, the user context for that ...
PatMcClellan__c's user avatar
-1 votes
1 answer
125 views

Does an http post to a guest site count toward API limits?

I'm using a Twilio Studio Flow in conjunction with Salesforce. The flow makes an HTTP POST to a remote site set up on the org. (An apex class receives the data and fires a platform event, returning no ...
PatMcClellan__c's user avatar
1 vote
1 answer
359 views

Issue with formatting JSON for Rest API Post Request

First-time poster here so feel free to give me pointers on forum etiquette. I have been trying to teach myself Apex the past 2 months and I have a personal project that I am working on that involves ...
CDNHOPHEAD's user avatar
2 votes
1 answer
156 views

Getting a REST API error of "A pair of repeating parameter value lists were passed to an AMP HTTPPost function but the lists to not match."

I've tried two different REST API calls and they seem to work in Postman, but not when I set it up on my own. Same error for both so I'm guessing it's something simple I'm doing wrong. Full error -&...
Erik B's user avatar
  • 63
0 votes
1 answer
241 views

Not able to send JSON payload request to API end point using HTTPPOST2 ampscript

This is the RMM functionality we have implemented to capture customers response to our Marketing email and send that customer's response to an external API endpoint. We are trying to send Json payload ...
JNC's user avatar
  • 39
1 vote
0 answers
83 views

End point receipting of touchnet credit card transaction requiring IPs for guest user site for firewall rule

I'm in a real pickle! I have a missing critical, overdue deadline to use a TouchNet Upay site to receive deposits via credit card. Desperate help is needed. My code currently posts out to touchnet ...
Thad's user avatar
  • 51
0 votes
0 answers
227 views

How to set child parameters in apex http callout?

I am trying to create a stripe checkout session using an apex http callout. I am having difficulty setting line_Items as parameters. In java I would build them as such- List<Object> lineItems = ...
Sandboxdev23's user avatar
1 vote
1 answer
845 views

Unable to retrieve security descriptor for this frame error in SSJS

I'm trying to get my head around SSJS to create a script that can store the provided values in the SFMC database using Script.Util.HttpRequest function. I am able to see that the values provided were ...
Harshit Singh's user avatar
1 vote
0 answers
93 views

SSJS: Unable to retrieve security descriptor for this frame error

I'm trying to create a script to store values from a form on a cloud page in the SFMC database using the SSJS HTTP Post method, but I'm receiving the following error: Exception occurred: Unable to ...
Harshit Singh's user avatar
0 votes
1 answer
443 views

We want to Pass JSON Payload to JSON Code resource and need to execute Final HTTPPOST2 function on JSON to execute external API call at backend

Requirement -: We need to Pass JSON Payload from one CloudPage to JSON Code resource via HTTPPOST AMPscript method and need to execute Final HTTPPOST2 function on JSON code resource to send that ...
JNC's user avatar
  • 39
0 votes
0 answers
167 views

HTTPPOST2 Ampscript call taking too much time , impacting slow Thank you page load on form submission

Requirement We are working on a requirement where we need to send customer details (FirstName , LastName , EmailAddress) entered into web-form to "External API end point" So once customer ...
JNC's user avatar
  • 39
-1 votes
1 answer
172 views

Can I add suffix in urlMapping for HttpPost in RestResource

I'm having an apex class like this: @RestResource(urlMapping='/api/v1') global without sharing class MyRestService { @HttpGet global static List<sObject> getDataById() {...} @HttpPost global ...
Tuấn Trần quốc's user avatar
-3 votes
1 answer
49 views

This is my class for httppost request ,so i want to send the response code with error message when the request is come into the system [closed]

This is my code, what I want to send is if request is sucessfully created then send code 201 with sucess message and if not created then send 501 with error message @RestResource(urlMapping='/...
user117445's user avatar
0 votes
1 answer
925 views

How can I send a list of records (multiple forms with key-value pairs) in a single request via multipart/form-data HTTP POST

This is not about files, but about key-value pairs. And I already got below to work for ONE submission/record. How do I tweak below to support multiple record submissions? private final static string ...
Lightning Evangelist's user avatar
0 votes
1 answer
131 views

HTTPPost : Unexpected parameter encountered during deserialization: attributes

I am having the following code to insert a Case record. When I run the code using workbench I am able to insert a case record. But when I try to call the API from another sandbox I am getting Error : ...
Tamil's user avatar
  • 714
0 votes
0 answers
128 views

How to create multiple ApexClassMembers with one call?

According to answer to my previous question, Tooling API objects are not supported in /composite calls. Is there a way to insert a large (let's say 2000) number of ApexClassMembers instead of ...
Bartłomiej Góral's user avatar
0 votes
1 answer
332 views

HttpPost unable to parse LIST of JSON data

I'm testing this with the Salesforce workbench and I'm using /services/apexrest/myRestRequest/doPost with JSON data { "contacts": [ { "personEmail": "...
Matthew Harris's user avatar
-1 votes
2 answers
427 views

Record is only update from API [closed]

The record which came from Rest API should only update from API, no user can update the record manually. for(Opportunity guestuser: trigger.new) { id currentuser = guestuser.CreatedById; ...
Rakshanda's user avatar
1 vote
0 answers
211 views

Send MMS message to twilio from salesforce

I am trying to send MMS message with Twilio Api from my Apex Code. I have working logic which sends SMS message with Twilio API. Based on this documentation Sending Messages we neeed to add the "...
Vitalii Dehnerys's user avatar
-1 votes
1 answer
421 views

System.TypeException: Invalid decimal in Rest Resource @HttpPost

I developed an Apex REST web service in Salesforce with the method 'POST' and i am trying to insert the string value in currency field of Product__c object, so when I try to hit the API im getting the ...
user avatar
0 votes
1 answer
1k views

'System.NullPointerException: Attempt to de-reference a null object' error on test class for @RestResource @HttpPost

I developed an Apex REST web service in Salesforce with the method 'POST' This is my main class public class Product { public String pName; public String pRating; public List<Item> ...
user avatar
0 votes
1 answer
88 views

Error While POSTing to a third party PDF and additional parameters

I am calling a rest api with multipart/form-data content type. I need to pass a pdf and additional parameters to generate a pdf. The appends the additional params data to the pdf and generate a new ...
Usman's user avatar
  • 103
1 vote
1 answer
238 views

WSProxy HTTP POST Request only runs a handful of records at a time before erroring and pausing

I'm leveraging SSJS WSProxy's HTTP Request to send a payload over to a third-party server. The payload is essentially a data extension's information that is being looped over until all records are ...
Julie Nguyen's user avatar
0 votes
1 answer
195 views

Unable to create Case object with SSJS

I am able to create a Case in SalesCloud using Postman. However, with the same JSON payload this is failing from my CloudPage using SSJS (note that I retrieve the token successfully in the same page) ...
Johhnytska's user avatar
1 vote
1 answer
1k views

Do Apex rest services methods like @HttpPost support Apex class object as parameter?

I am writing an Apex Rest Service with the POST Method. For that, I have written an apex class wrapper for the request. Like below. global class RestRequestWrapper { global String eId; global ...
Rahul Gawale's user avatar
  • 11.9k
1 vote
0 answers
261 views

Contact Deletion in Automation Studio with SSJS

Basing on the article here I prepared a code snippet to run in Automation Studio. Unfortunately we receive Bad Request(400) error for second API call everytime even though all passed parameters are ...
Piotr's user avatar
  • 11
0 votes
1 answer
201 views

Using landing page to receive data from a callback

I am using MC Event notification Service and I created a callback (using a 3rd party site) to receive data posted back from Marketing Cloud. I want to see if I can utilize a landing page to receive ...
rajpc's user avatar
  • 49
0 votes
1 answer
2k views

How to submit a Pardot form using AJAX?

I am confused a little bite, why pardot is not allowing such ajax requests ? aren't they more user friendly features ? I added a form handler and tried to use it of course & it works when I keep ...
TaouBen's user avatar
  • 154
3 votes
1 answer
967 views

Possible to Authenticate an incoming Webhook for use with Post REST Service

Still new to working with REST services and apex in general. I have put together a simple REST Service for inserting records with JSON delivered via HTTPPost. Everything works great when I use ...
Jack S's user avatar
  • 53
0 votes
1 answer
201 views

Rest Service - Return grandchild in the response

I need to create a Rest Api where I want to take as input an Id and perform a query on an object. The response must contain the fields of this record and also some related records (children) and the ...
Giorgos Galaios's user avatar
0 votes
1 answer
270 views

partner.soap.sforce.com Http POST request

What is the endpoint to POST <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/...
pincet's user avatar
  • 839
0 votes
1 answer
763 views

SSJS Error on HTTP.Post

I'm facing an issue on sending an HTTP post request from Marketing cloud to ElasticSearch using SSJS. The aim is to send some import statistics of flat files to ElasticSearch in order to retrieve it ...
Pierre Lhostis's user avatar
0 votes
1 answer
98 views

Not able to Save the HTTPPOST2 response in the data extension

I have made a HTTPPOST2 API call and got the JSON response. I want to insert the JJSON response into Data Extension. Below is the JSON response : { "success": true, "...
Priyanka's user avatar
0 votes
0 answers
31 views

Writing a test class for an HttpPost [duplicate]

I'm not able to figure out how to get any code coverage on an Apex HttpPost method. Apex class: @RestResource(urlMapping='/approve/*') global with sharing class exAppClass { jstcl__TG_Timesheet__c ts =...
Luke Higgins's user avatar
6 votes
1 answer
3k views

Can we Have two Http Mock Callouts in a single test class method

In My Method making two callouts in a single transaction Get Access Token For that API --> GetAccessToken Execute Payment When i ran the test class getting following error 08:50:00:839 ...
SFDC_Beginner's user avatar
0 votes
1 answer
1k views

http callout `Client credentials are missing` by using Basic Auth

I am trying to get the access token by calling PayPal API,I Am getting Client credentials are missing response. public static HttpResponse GetAccessToken() { Http http = new Http(); ...
SFDC_Beginner's user avatar
0 votes
1 answer
1k views

Apex rest service issue with HTTP Post method when i Access from Postman

i created Apex rest service and @HttpPost method , i am able call POST method & got data in request body successfully from workbench. but i had issue with when i try to access from Post man. i ...
sdandamud1's user avatar
  • 2,705
0 votes
1 answer
7k views

SSJS HTTP.Post throws error instead of returning status code

I am banging my head against the HTTP.Post function. The documentation says: Performs an HTTP POST using the provided information against the passed URL. The function returns a JSON object ...
shd.lux's user avatar
  • 466
0 votes
1 answer
148 views

salesforce Apex class - Http Post json

This is kind of new to me - I need to make apex http post call and to set the body as json. My json is constructed in the following way: { "request": "request", "ID": "reqId", "getString": { ...
Omnia's user avatar
  • 191
1 vote
1 answer
812 views

How Do I Send an HTTP POST API Call Through a Script Activity Using Basic Auth?

I have seen a few posts about how this can be done using oauth, but I need to use basic auth and I can't seem to get it to work. Below is an example of the code I'm using. <script type="javascript"...
Brett's user avatar
  • 153
0 votes
2 answers
2k views

Unable to retrieve security descriptor for this frame error in HTTP POST request SSJS marketing cloud

I am trying to post a request to my site and I am using SSJS HTTP post method. But the POST request is throwing error "" Unable to retrieve security descriptor for this frame. Im not sure what i ...
Manoj's user avatar
  • 1
2 votes
1 answer
1k views

SSJS HTTP.Post ValidEmail with requested Access Token

I am trying to make an API request in SFMC to validate email addresses, which requires first to get the Access Token. I was able to request the access token, but then the next HTTP.Post request I do ...
Bruda's user avatar
  • 41
0 votes
1 answer
474 views

HTTP Post response error - "Value was either too large or too small for an Int32."

I am trying to retrieve a portion of the response related to a template-based email via a Cloudpage. I am attempting to get the "items" portion of the response. I get the following error: Value was ...
Quaser8000's user avatar
2 votes
1 answer
759 views

Unable to process HTTP return codes except 200

We are having an integration with an external REST API which we are invoking from a SSJS script hosted on a cloudpage. We have tried couple of ways to invoke the API Call - Script.Util.HttpRequest &...
Keddy's user avatar
  • 61
0 votes
1 answer
1k views

dynamic json body as http post request

public class RequestWrapper { public static GetUrlRequest GetUrlRequest; public class OrderDetails { public String txnId; public String custOrder; public ...
user905's user avatar
  • 261