Questions tagged [http]

The tag has no usage guidance.

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

Store callout values in Global picklist

I have created a global picklist for Country code. Eg the global values for country code is AC,AD,AE,AF,AG etc. And I have created a Picklist called Country_Code__c in Contact object. Same as well ...
blackFire's user avatar
1 vote
1 answer
58 views

Do queueables have their own governor limits?

I have a class that makes consecutive API calls. I set the timeout to the maximum value allowed by Salesforce (120 seconds) however sometimes these are timing out because of the API taking way too ...
sfNewbie's user avatar
0 votes
0 answers
50 views

HTTP Callout in a flow to make a Marketing Cloud callout [duplicate]

Hello, I would like to call a Marketing Cloud API from a flow in Salesforce. I have 2 options, first is to use an invocable apex method (tested and it works fine). Second option is to use a HTTP ...
Oupat's user avatar
  • 733
0 votes
1 answer
87 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,179
0 votes
1 answer
104 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
1 vote
1 answer
255 views

HTTP Callout action in flow returns internal server error 502

I am first time trying out the HTTP callout action inside of the flow. I have added a query string parameter called content and ran the flow using the debug button. I see the expected response but ...
sumchans's user avatar
  • 777
0 votes
1 answer
854 views

Callout failed for invocable action

I'm trying to set up a FLOW with an HTTP Callout "GET" request and I'm getting the below exception. Info Error Occurred: Callout failed for invocable action GetProspectLinkedinSearchTest....
Pavan tej's user avatar
  • 1,460
-1 votes
1 answer
34 views

Calling functions in a screen flow

I am creating a screen flow with a http callout. First the screen captures a few fields from the user, then it makes a http callout to send the info captured as parameters to a remote site. Among the ...
user9035826's user avatar
-2 votes
1 answer
4k 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
1 answer
360 views

HttpCalloutMock is not working. Methods defined as TestMethod do not support Web service callouts

My Mock class is not being called in the test class. So it is throwing 'Methods defined as TestMethod do not support Web service callouts' error. PremCalloutServiceTest - This is the test class @...
Dilipan Manoharan's user avatar
1 vote
1 answer
2k views

How to check if a http response is null when it is an empty object and status code is 200?

Im making a POST to an endpoint and this is what I get back in my response, its a successful POST and the status is 200 but the payload is empty. { "payload":[], "datetimestamp"...
potato46's user avatar
0 votes
1 answer
467 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
259 views

IP address error while invoking URL through form post request

I am invoking an external URL through HTML form post request. Sample : <form target="_blank" action="https://website.com/action.php" method="POST" target="abcd&...
SFDCRookie's user avatar
3 votes
2 answers
394 views

System.Formula.recalculateFormulas triggers DML statement while running unit tests

It seems that System.Formula.recalculateFormulas method triggers unexpected behaviour during apex unit tests. Has anyone faced this issue or has any explanation why this is happening? Logs do not show ...
Arnas Baronas's user avatar
0 votes
1 answer
987 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
168 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
  • 724
-1 votes
2 answers
127 views

I have the HTTP put class and when I insert/update using postman and remove revunue date from json I get an error nullpointer exception

global with Sharing class ContractHeadersRESTAPI{ @HttpPut global static String ContractHeaderUpdate(String Name, String ContractName,String Type,String EndDate, String ExternalID,String ...
user107945's user avatar
0 votes
1 answer
398 views

Solving issues of resSystem.HttpResponse[Status=Method Not Allowed, StatusCode=405]

Iam trying to use rest to retrive the files from one org to another org 1.To send the Id of the content version in opportunity from source org to target org 2.Target Org should get the id and store ...
user102356's user avatar
-3 votes
2 answers
5k views

Apex error : You have uncommitted work pending. Please commit or rollback before calling out [duplicate]

Apex error : You have uncommitted work pending. Please commit or rollback before calling out. I get the above error when I try to make two http callout one after the other and store the result in ...
Saurabh's user avatar
  • 27
0 votes
2 answers
3k views

Missing return statement required return type: System.HttpResponse

I'm going through this trailhead module and, as a good newbie, I'm experiencing some issues in completing the hands on challenge. This is my AnimalLocator class: public with sharing class ...
robruf's user avatar
  • 362
0 votes
1 answer
967 views

Pass trigger record values to Apex class for Http callout

I'm fairly new to custom development/coding in general. I've created some Stock__c records in my playground and am trying to update their price using an Http callout to IEX Cloud API. What I can't ...
tpayne2345's user avatar
0 votes
1 answer
1k views

Stripe API request working with Postman but failing with Apex Rest Callout

I'm trying to make a callout to a Stripe Api with Apex. I made the exactly same request in Postman with the same Http configuration and have this working well. But when running it with Apex i get a ...
Nanon Ouattara's user avatar
1 vote
0 answers
77 views

Parsing of Json response from Tooling API code [duplicate]

Please have a look through the attached debug log Below is my code:- Apex Class:- Http http = new Http(); HttpRequest request = new HttpRequest(); request.setEndpoint(Url....
SFDCTashan's user avatar
0 votes
1 answer
3k views

Create a test class for RestResource class with a response code

I have a @RestResource class which receives data from a third party, finds the matching record and updates it, then returns a success/fail to the third party. I've just added the RestContext.response ...
Irene's user avatar
  • 1,811
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
2 votes
1 answer
89 views

Help with Rest Resource

I'm working with integrations rn, and I'm stuck... I need to create a public site to receive calls fired by a third-party system. I'm using this tutorial: http://www.wadewegner.com/2013/03/creating-...
RedMan's user avatar
  • 107
1 vote
1 answer
1k views

Charset is set incorrectly to us-ascii instead of utf-8 when sending email from Marketing Cloud

We have an issue where an email sent from a journey is rendered with '????????' instead of Hebrew letters. We examine the mime code header (within the .eml file) and found this: Content-Type: text/...
Barak's user avatar
  • 133
2 votes
0 answers
710 views

Getting status code 400 Bad Request when making HTTP request to shopify

I'm relatively new to SF/APEX, but a developer of 15 years so I'm pretty well versed in making a HTTP request. For whatever reason, I can't accomplish this using APEX. When I try to make a simple ...
Siraris's user avatar
  • 121
0 votes
1 answer
3k views

Json generator with list of records from Salesforce

I'm new in Apex and we have requirement, I need to send a record from salesforce to external system using Rest API whenever a record is created in Salesforce, I need to send couple of SF fields to ...
Salman Shaik's user avatar
1 vote
1 answer
1k views

Delete/Update Global Value Set values using Tooling API

I'm trying to update or delete values in my Global Value Set. I succeed insert new values with the code below: but when I change SetMethod to DELETE I get Bad Request with status code 400 is there ...
Shoval's user avatar
  • 13
2 votes
1 answer
213 views

What is the difference between callout and HTTP request? [closed]

I don't quite understand those concepts. Are they the same?
NickName43's user avatar
6 votes
2 answers
2k views

Are there any external call out limits in Marketing Cloud?

I would like to run an SSJS script which makes callouts to a third party system (which sends WhatsApp messages). As this action will happen frequently I would like to know if there are any limits I ...
Deployment Failure's user avatar
2 votes
1 answer
283 views

Auth errors and callout errors in Scratch org

I have an app that makes API Rest calls to my cratch org. Till yesterday everything was working fine. Yesterday I have configured scheduled apex class job to run in the night. But when checked the ...
ypeskov's user avatar
  • 23
1 vote
0 answers
386 views

setting a large http body

I am trying to send a http request with a large string Body; however, salesforce complaints about the size of the string, the error as follows: caused by: System.StringException: String length ...
Cuban coffee's user avatar
  • 1,554
1 vote
1 answer
929 views

Error when pulling PDF from HTTP response

I have a question regarding this post: handle PDF content in HTTP callout When I try the above code I'm getting this: "Unrecognized base64 character: %" The logs show this as well: 19:53:04:658 ...
George's user avatar
  • 13
1 vote
1 answer
2k views

SSJS HTTP Get method error - Unable to retrieve security descriptor for this frame

I am trying to retrieve a template-based email asset using the Content Builder API via a Cloud page. I am having trouble retrieving the template. I am not sure if it is an issue with the structure of ...
Quaser8000's user avatar
0 votes
1 answer
372 views

not able to access the variable values after using the continuation class

private class StateInfo { Account acc {get; set;} StateInfo(Account acc){ this.acc = acc; } Contact cont {get; set;} StateInfo(Account acc, ...
user905's user avatar
  • 261
1 vote
0 answers
206 views

Rest API callout using basic authorisation

String filter = 'OrderNumber eq \'1000035\' and SoldtoCustomer eq \'10045005\''; String Username = user; String Password = pass; String expand = 'EvLineDetailsSet'; String format ='...
Akshika Jain's user avatar
1 vote
0 answers
203 views

Failed to get success response in “application/json” using Name Credential

HttpResponse in “text/html” instead in “application/json” if using Name Credential Step1 : Name Credential Step 2: Authentication & Authorization Code RESPONSE header>>>>>: ...
Asif Khan's user avatar
0 votes
1 answer
4k views

HttpResponse with status code 0 [closed]

I am using an API to get some response. When I check my HttpResponse. It is like this: System.HttpResponse[Status=null, StatusCode=0] In what case we get such a response?
वरुण's user avatar
1 vote
0 answers
237 views

Quickbooks API PDF upload error: Maximum line length limit exceeded

I'm trying to upload pdf file from Salesforce to Quickbooks attachments via Quickbooks API. It works fine with small files, but if file size exceeds 999 bytes, the following error appears: An ...
snowysparrow's user avatar
3 votes
1 answer
2k views

REST GET API response does not contain null fields

I have written a REST API endpoint for Account object for GET operation. The code is below - @httpget global static list<Account> doget(){ RestRequest req = RestContext.request; RestResponse ...
Aritra Chakraborty's user avatar
1 vote
0 answers
116 views

HTTPS url for Community isn't redirecting

We are about to launch our Salesforce Community. We created a custom domain and URL using this option for our domain: "Salesforce serves the domain over HTTPS, on Salesforce's servers, using your ...
Lori Rott's user avatar
0 votes
1 answer
377 views

POST to an external API from visualforce page

I am using OpenCTI in Lightning to enable click to dial. I want to click on the phone number and call an external API to make the dial. I have a visualforce page as CTI Adapter. When the page loads ...
nmess88's user avatar
  • 163
0 votes
2 answers
4k views

PATCH Issue - {"Message":"The requested resource does not support http method 'POST'."}

I have a callout that is having an issue with it's POST. I have seen a couple of work arounds for this issue but none of them seem to work with my integration. req.setMethod('POST'); req.setHeader('...
Olivia's user avatar
  • 3,461
0 votes
1 answer
1k views

Is a Request possible without a Response Status?

Utilizing a custom salesforce connect adapter, callouts are being made using the HTTPRequest and HTTPResponse classes. 40,000 requests to these webservices are being made and all but a few (2-5) are ...
S.B.'s user avatar
  • 2,071
1 vote
1 answer
2k views

Metadata Rest API for custom objects

Is it possible to create and update custom objects using rest? I seen different questions that suggest it isn't yet available without using a client or SOAP but I need to be able to access it through ...
Meerfall the dewott's user avatar
0 votes
1 answer
246 views

Saleaforce IOT: ESP8266 IoT device facing 302 Http redirect instead of 201 when calling REST API because of insecure HTTPS call

ESP8266 has been able to get OAuth token by Device Flow OAuth2.0 After getting OAuth token, I was hitting the REST API endpoint /services/data/v45.0/sobjects/Account with a JSON body in the request: ...
Raja Paul's user avatar
0 votes
2 answers
3k views

Salesforce server IP which is making callout

I have a batch process which makes a HTTP call out to third party, but because of IP restriction third party is denaying the request. Is there any way to get Salesforce server Client IP from where ...
Harry's user avatar
  • 3
2 votes
3 answers
1k views

Make http callout in batch after insert actions

I have a batch job with http callout enabled, in the execute() method, the code logic goes like: global void execute(Database.BatchableContext BC, List<Object> scope){ List<CustomObject&...
Xi Xiao's user avatar
  • 865