Questions tagged [httppost]
The httppost tag has no usage guidance.
96
questions
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 ...
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-...
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 ...
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 ...
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 ...
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 ...
-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 ...
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 ...
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 -&...
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 ...
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 ...
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 = ...
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 ...
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 ...
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 ...
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 ...
-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 ...
-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='/...
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 ...
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 :
...
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 ...
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": "...
-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;
...
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 "...
-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 ...
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> ...
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 ...
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 ...
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)
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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/...
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 ...
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,
"...
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 =...
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 ...
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();
...
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 ...
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 ...
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": {
...
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"...
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 ...
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 ...
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 ...
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 &...
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 ...