Skip to main content

Questions tagged [httprequest]

httprequest is the request sent by browser to server for particular resource.

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

'Expect' header added in automation studio

We are calling a 3rd party API and we noticed that marketing cloud is adding automatically the 'Expect' header when running the code in a script while its not when running the code in a cloud-page. ...
SebOB's user avatar
  • 837
0 votes
0 answers
20 views

Time scheduled Flow with APEX containing httprequest to external service that return a value [duplicate]

I want to create a Time scheduled Flow that contains APEX action. APEX includes HttpRequest to external service and return a value from it. Value is used to update an existing record field. How can I ...
jht224's user avatar
  • 1
0 votes
0 answers
28 views

Editing Managed Package new Named Credential (not legacy) URL in subscriber org

I'm looking to add a new Named Credential (not legacy) to my managed package. There's a similar question here, but that's in relation to legacy named credentials. Looking at the documentation, it ...
Nick C's user avatar
  • 7,220
1 vote
1 answer
37 views

HTTP DELETE for a Push Location

I'm trying to delete a Location through rest api with the api documented here. The script I'm using is: *code to get the authentication* var IdLocationsDelete = ["ID1", "ID2"] var ...
Raas's user avatar
  • 31
0 votes
1 answer
26 views

HTTP GET for All Push Locations not working

I am creating a script to get the list of all locations but the Get function is not retrieving anything. Here's my script: <script runat="server"> Platform.Load("Core", "...
Raas's user avatar
  • 31
0 votes
0 answers
46 views

How to set the values for Permissions-Policy for custom Force.com site

How to set the values or enable Permissions-Policy for custom Force.com site ? We have one custom page build on force.com platform, upon doing the penetration testing we are getting below result ...
neel saha's user avatar
1 vote
1 answer
107 views

POSTMAN form-data in APEX

I have a problem, I have a call in postman to add a document in base64 with some information that works fine: data and dataExp are a series of metadata to classify the document and in content64 is ...
Banzoni's user avatar
  • 31
0 votes
2 answers
137 views

Get full Endpoint of a NamedCredential-based HttpRequest without making a SOQL

So you have an ordinary code that makes a callout using Named Credentials: HttpRequest request = new HttpRequest(); request.setEndpoint('callout:NamedCredentialName/someAdditionalPathHere'); ... ...
Andrii Muzychuk's user avatar
0 votes
0 answers
65 views

Using blob variables in apex code [duplicate]

Good afternoon, A while ago I made a post on this topic to see how to send blob variables from a visualforce to the controller. Finally I did not find any solution that was useful to me, so I chose to ...
Banzoni's user avatar
  • 31
1 vote
0 answers
83 views

Visualforce Blobs variables in apex code

I'm here to tell you about a problem I'm having and what I think should work is not working for me. The main problem is that I am integrating Salesforce with a new document manager. The administrators ...
Banzoni's user avatar
  • 31
1 vote
0 answers
753 views

System.CalloutException: PKIX path building failed: unable to find valid certification path to requested target

Sorry for the unexpected appearance, I saw your profile on the forum dealing with the error: System.CalloutException: PKIX path building failed: sun.security.provider.certpath....
Banzoni's user avatar
  • 31
0 votes
1 answer
36 views

Read PDF from stripe portal

I am having this URL https://pay.stripe.com/invoice/acct_1OtiZXH7y1vTRsp1/test_YWNjdF8xT3RpWlhIN3kxdlRSc3AxLF9RMkxNanIzNXN3TTlZOHNaaUZLZm9kQnBjemh3STBXLDEwNTI2NDAzOA0200luNre0xP/pdf?s=ap and when we ...
SFDC-Beginner's user avatar
0 votes
1 answer
90 views

Regarding RestRequest headers

I am trying to set the RestRequest reqeust with the below code, however up on pushing to org I am getting an error. Code: private static void setAuthHeader(RestRequest req, Boolean mockTest) { ...
Dan's user avatar
  • 3
2 votes
1 answer
687 views

How do you correctly populate an External Credential from a Principal for a Named Credential?

In Salesforce, I want to consume a web API which I can successfully call from my command line like: curl --location 'https://dummyapi.io/data/v1/user?limit=10' \ --header 'app-id: SomeApiKey' In ...
Brian Kessler's user avatar
1 vote
1 answer
711 views

System.CalloutException: Illegal character in opaque part [duplicate]

I've got a problem calling the below endpoint from apex. I created named credentials and auth provider to authenticate with the service and while executing the http request, I'm getting below error ...
CloudUser985's user avatar
1 vote
1 answer
301 views

Marketing Cloud - SSJS Activity timing out. Not sure of error

I have an SSJS Activity I am trying to get to work wherein we are calling an API endpoint using basic authentication (obviously the user and pass are obscured in production). But I am having issues ...
seanhmartin's user avatar
0 votes
0 answers
158 views

How to put external credentials salesforces api token access

I'm new to Salesforce and my task is to create a flow that makes an HTTP callout to a private API. To access the API, one needs to create an account and obtain a token which is valid for 7 days. I've ...
LigthFire's user avatar
0 votes
0 answers
204 views

Get Presigned URL using named credentials

I successfully obtained the pre-signed URL to upload large file to aws s3 bucket using the method described in the article https://mtr-design.com/news/how-to-create-a-presigned-url-for-aws-s3-using-...
Mohamed Ashfak's user avatar
1 vote
1 answer
192 views

Possible exceptions when making a callout in Apex

I have inherited the following code and I am wondering if the try-catch is actually worth it? (Logger is a custom logging class and uses platform events to trigger the log) try { response = h.send(...
fred's user avatar
  • 3,515
0 votes
0 answers
215 views

Apex callout using multipart/form . JPEG works, PDF does not?

I have been working through setting up a callout using POST, using a multipart/form-data content type via apex. Currently just validating the request generation via a mock server hosted on postman. ...
api-testuser45690's user avatar
0 votes
1 answer
1k views

How to get Refresh Token in Postman in 2024?

I've been trying to get the refresh token using Postman without success. It seems from what I've found that some ways have changed over the years. I do have the request to get the access token, which ...
Z0q's user avatar
  • 3
1 vote
0 answers
3k views

Unable to tunnel through proxy. Proxy returns "HTTP/1.1 500 Internal Server Error [closed]

I am making a callout from my PartnerBusinessOrg to one of it's underlying Orgs. Each Org has a connected app, originating from a templating org within them. When I am trying to make a callout to the ...
RPlantinga_MySolution's user avatar
0 votes
0 answers
296 views

How to create a HTTP Request with multiple values in form-data as body [duplicate]

I have a use case that necessitates the inclusion of form data, including a file, within the body of an HTTP request. How can I accomplish this using Apex? I aim to replicate a similar request to the ...
Mridul Kapil's user avatar
0 votes
1 answer
586 views

Salesforce apex rest api url not found

I'm looking to send JSON data to external system using Apex. However, this data does not belong to any specific SObject but it is some logic and mainly passes along metadata. I have an Apex Class I'm ...
user569925's user avatar
  • 1,189
0 votes
0 answers
24 views

how to create multipart/form-data callout from apex along with few more fields to send [duplicate]

We are doing freskdesk integration and want to do this callout - add Note to ticket This integration require multipart-form data request type. Checked many blogs and stackover flow question-answer but ...
Ankuli's user avatar
  • 700
0 votes
1 answer
305 views

HTTP Response data being Truncated

I am making a http request and getting response in JSON . When I am converting it to String using request.toString() but getting the truncated response response sample(This is the part of response ...
Sahil Gupta's user avatar
0 votes
1 answer
342 views

How to append a variable to a named credential?

Here is my small code that calls a named credential. Now how do I call the endpoint utilizing the named credential and adding a path to it like below? Currently I get a 404 error string filename = '...
sumchans's user avatar
  • 887
0 votes
0 answers
243 views

How to handle HTTP Call Out in a for loop that is in a Queueable class

I am having some issues with making a callout in my for loop. I have a batch class that calls my queueable class which then loops through and sends a single parameter to the endpoint. What is ...
Seng Soukhavong's user avatar
1 vote
1 answer
176 views

HttpRequest to SAP encoding $ and space caracters

I have a wierd problem: I'm calling SAP from salesforce apex and I have trouble with one of my request. This one is working. request.setEndpoint(authentification_details.Webservice_enpoint__c+'/...
Julien Souchi's user avatar
1 vote
1 answer
660 views

Attempting to pass Flow variable to Apex to use in HTTP request & create PDF

I think I'm quite over my head in this class. I'm trying to do about three different things that are brand new to me. In short, I'm trying to do this : Pass a variable to an Apex class from a Flow (...
Zoom_v's user avatar
  • 3,924
0 votes
0 answers
666 views

Scheduled-Trigger Flow only updating first record

I am having an issue with a simple Scheduled Trigger Flow. It is my understanding that a flow of this type should be able to update a batch of records at once without requiring a loop to facilitate ...
CDutko's user avatar
  • 25
0 votes
1 answer
1k views

" the field is not available to the running user" error when updating from a Transform record collection

I have a simple flow that looks at the VIN number on a customer Trailer record, and looks up info from that VIN via the NHTSA API. Immediately after the HTTP call I have a Transform element that maps ...
Erik B's user avatar
  • 1
1 vote
1 answer
548 views

Cannot see Http Callout in Flows

To turn on Http callout in flows, at first I have made an external credential with authentication protocol as custom. After that, I have made a named credential, enabled it for callouts, and use the ...
Sampad Boby's user avatar
0 votes
0 answers
22 views

How to sent ContentVersion's VersionData through API? [duplicate]

I am trying to send a pdf file attached to a record of custom object to an external system. I am using ContentDocumentLink and ContentVersion to get the file in apex and make a api call. File is ...
PARAG TALUKA's user avatar
0 votes
0 answers
155 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
-1 votes
1 answer
42 views

Getting Error in This Test Class

@isTest private class LeadUpdateTriggerHandlerTest { @isTest static void testHandleUpdate() { // Create test data Lead testLead = new Lead(FirstName = 'Test'...
user131546's user avatar
3 votes
1 answer
4k views

How to write an APEX Test Class with Multiple Http Callouts (Renamed)

I'm relatively new to programming, and I am attempting to write the Test Class for an Apex Class that has an HTTP Callout. I have already created the HTTP Mock Class to simulate the Callout, but when ...
nigeldendy's user avatar
-1 votes
1 answer
362 views

Metadata service Invalid Session Id on future method

I'm making a call to the Metadata service API. The Api call happens in future methods. I have tried both approaches of passing the Session Id as a parameter to the future method and also getting the ...
Saurabh's user avatar
  • 27
2 votes
1 answer
445 views

Visualforce CORS Error Even When Origin Is Whitelisted, Headers Are Also Set

I'm creating a PDF viewer using Visualforce and the PDF.js library. My project doesn't include react. When I try to execute pdfjsLib.getDocument() passing the URL of a PDF stored in Salesforce itself, ...
Emmanuel_M's user avatar
0 votes
1 answer
470 views

Security scan is complaining on setEndpoing

My company uses a security scan tool called Snyk to scan code for security vulnerabilities. It is complaining about a Server-Side Request Forgery (SSRF) vulnerability. The details says Unsanitized ...
James's user avatar
  • 337
-2 votes
1 answer
7k views

The callout couldn't access the endpoint. You might not have the required permissions, or the named credential

I have created a named credentials which has a endpoint like this and it is authenticated https://#######-#####.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=####&deploy=1 while ...
sfdc_to_learn's user avatar
0 votes
3 answers
1k views

Creating HTTP Request with graphql Query

I've been trying to add a graphql Query in a httprequest that is sent out to an api that receives the query. I've tested the query within postman and was able to get the result. However when I try to ...
Kevin Yao's user avatar
  • 167
0 votes
0 answers
1k views

Named callout Null in http request with named credential - What would cause it?

I am making a callout and getting the error "System.CalloutException: The callout couldn't access the endpoint. You might not have the required permissions, or the named credential "XXX"...
Pauline's user avatar
  • 395
0 votes
1 answer
608 views

how to 'encode' the body in an HTTP body?

i am trying to send this body exactly as it looks { "table":"inquiries", "response_type":"json", "query_array":"{\"fname\":\...
potato46's user avatar
0 votes
1 answer
761 views

Retrieve Request Method from HTTP Request Header

I would like to know if there is a way to retrieve an HTTP request method from the HTTP request headers. Based on the method used (GET, POST, ...) I will run a different logic on my Cloud Page. If I ...
Hroosha's user avatar
  • 53
-1 votes
1 answer
417 views

Pass Http Get and Http Post as asynchronous apex in order [closed]

My requirement is to pass data from my org (Salesforce) to external org (SAP S4). I have successfully made the class for integrating both. However, I need to pass this class in a trigger and since it ...
Capt Shaunz's user avatar
0 votes
0 answers
338 views

Apex callouts - TLS ciphersuite

I'm working on an integration with Salesforce using Apex code to make outgoing API calls. One of our users is asking what cipher is being used. Is there any way to figure this out? Some way of viewing ...
James's user avatar
  • 337
0 votes
0 answers
161 views

How to Create a Test class with a Future Callout that is not dependent on an HTTP Response?

I am new to Apex, but I have been tasked with sending a Salesforce Custom Object to another Company system. My Class works as expected, but my test class fails due to having a @future method. I did ...
nigeldendy's user avatar
1 vote
0 answers
455 views

Unable to access array within an array from Salesforce flow http callout (beta)

In sandbox, I am attempting to gather the information from https://data.nasdaq.com/api/v3/datasets/USTREASURY/YIELD.json I used the beta feature of creating an HTTP callout right from the flow. It ...
Kashona's user avatar
  • 73
-2 votes
1 answer
4k views

HTTP Request Body Call Out Salesforce Apex

I just want to call an API from an Apex. But all i know how to do is thru JSON String for the body. The integration team required me to call it thru Data Form which i can call it from Post. I got no ...
user3751759's user avatar

1
2 3 4 5
10