Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

cURL is a computer software project providing a library and command-line tool for transferring data using various protocols.

1
vote
0answers
37 views

sObject Collections - Update Multiple Records via REST using PATCH - Bad Request 400

I am trying to use the Salesforce sObject Collections REST API resource that was released in Spring '18. Per the Salesforce Documentation, this should be a PATCH request, however when I try to call ...
0
votes
2answers
28 views

Trying to run a sql activity thourgh a curl SOAP request - SoapAction incorrect?

If I manual trigger/run the activity the destination Data Extension is being filled correctly. However when try a SOAP request using curl, nothing happens... I've tried 2 different SoapAction values. ...
1
vote
1answer
63 views

How to pass API endpoint URL containing \ to

I'm trying to pass the given URL to the setEndpoint method, but I'm getting an error. This particular API URL contains backslash and maybe that's the problem because the code works fine with other ...
0
votes
0answers
64 views

error=invalid_client_id for authentication

I have enabled the Contacts app in SF to be connected and have the consumer and secret keys. Following the steps in https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/...
0
votes
0answers
29 views

Providing feedback to Einstein Vision using URL

I've been working with Einstein Vision and read all the documentation I can find. I am having trouble trying to provide feedback to the model using an image from an online source (Salesforce or ...
0
votes
0answers
21 views

Is there a way to retrieve all attributes of an Object? Using Fuel-sdk or Curl or whatever

This is an old unanswered question from 2015: is there a way to retrieve all fields/attributes of a data extension or any other object using Python Fuel SDK, a straight Curl request, or any other ...
1
vote
1answer
129 views

BULK API cURL commands to GET 100k records from Account

curl "https://xxx.salesforce.com/services/data/v35.0/query/?q=SELECT+Id,+Name,+Phone+FROM+Account" -H "Authorization: Bearer <access token> " But this only fetching 2000 records. I need all ...
4
votes
1answer
140 views

Connected App built in SANDBOX has access to PROD

I created a ConnectedApp in my Sandbox environment (see below img for settings details). I noticed that I can use the consumer key and secret from my sandbox connected app to attain a PRODUCTION ...
0
votes
0answers
73 views

Token is not passing in the curl post php

$sf_auth = 'Bearer ' . $accessToken; $chh = curl_init('https://www.exacttargetapis.com/hub/v1/dataevents/key:Web_Registrations/rowset'); curl_setopt($chh, CURLOPT_CUSTOMREQUEST, "POST"); ...
0
votes
0answers
57 views

Apex API call vs cURL example giving different results

I sending an API request through apex: -method is POST -Basic auth header -Accept header as "application/json" -endpoint is receiving formdata parameter in body of form "notice=somebase64XML" Code ...
0
votes
1answer
213 views

Calling a flow through REST api returns “http body is required” error

I'm trying to initiate a flow through the REST api using PHP: $url = "https://myInstance.salesforce.com/services/data/v40.0/actions/custom/flow/EndCourse_and_Semester_Notification"; $headers = array(...
0
votes
0answers
37 views

Update a Record's Fields in Production Org from External Website w/o Salesforce Login

I have a form on my WordPress website that collects additional information from customers. I want this information added to an existing record of MyCustomObject. To do this, I will need to make a ...
1
vote
1answer
204 views

cURL Error 51 when Posting to Force.com

I have a form on my WordPress website that collects additional information from Leads. I want this information added to an existing Lead record, so I made a WordPress plugin that initializes a cURL ...
0
votes
1answer
23 views

Populate Primary Point of Contact Field ( Business Account ) from Contact Object

I am using PHP cURL to populate data in the Customer, and the Account Object. I am working to link the two objects together via Contact Role. In which object field do I need to assign a value to in ...
0
votes
2answers
91 views

How to create a business account with the REST API

I can create a person account using the REST API, but I can't seem to find any documentation on how to create a business account. I imaging that the post items you send need to include something extra ...
0
votes
1answer
906 views

Authorization PHP Curl returns Login page instead of token

I am trying to use PHP curl to authenticate my app's user, but instead of authenticating with OAuth it returns the actual html login form as a response. Why? I don't want to redirect the user over and ...
0
votes
2answers
2k views

salesforce rest api invalid session id error when using access token

I am trying to retrieve data from salesforce using the REST api and CURL in PHP. I perform the authentication request and receive an 'instance_url' and 'access_token' but after performing a query ...
2
votes
1answer
251 views

curl post request to marketingcloud REST API is returning InvalidOrMissingTo

Same request works from POSTMAN but I'm getting in troubles when trying curl. curl -d @al.json -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer this_is_a_valid_token" -X ...
0
votes
1answer
320 views

Username/password authentication curl attempt failture

I'm trying to get an access token using following curl: curl --data grant_type=password&client_id=Y&client_secret=Z&username=A&password=B+C https://login.salesforce.com/services/...
1
vote
0answers
260 views

Slow REST API return for first call of day (30s+)

I asked this question on the SF developer site, but didn't hear back. Hopefully, somebody here has seen this before, and can help me out. We have boiled it down to a few cURL calls for ...
0
votes
1answer
124 views

Posting Jenkins build status to SFDC via rest API chatter

We are trying to explore how we can post Jenkins build status to SFDC via Rest API Chatter. Tried below steps Generated Access Token curl -X POST --form client_id=...
0
votes
1answer
442 views

Convert cURL to Salesforce APEX rest api

Hoping someone could help with this little problem I am having, I have a cURL that works just fine, but what I need is an Salesforce APEX / Rest API / HttpRequest instead. Here is my cURL: curl -X ...
0
votes
1answer
191 views

Where to find an example of using cURL, PHP, and a pick list value to select another field?

Can someone give an example, or a link to an example, of using PHP and cURL to select a column's value based on a pick list value?
1
vote
1answer
363 views

Can I Upload Remote PDF File to Account via PHP?

Been searching for awhile but haven't been able to find any examples.. I'm trying to upload a remote PDF file to an Account record in SF using PHP cURL / Json, is that possible and if so do you have a ...
0
votes
2answers
573 views

Error “Unsupported Grant Type” while trying to POST to salesforce using the PHP

<?php $data = array("grant_type" => "password", "client_id" => "*********************************","client_secret"=>"************","username" =>"*********","password" => "************...
1
vote
3answers
921 views

Converting from cURL to Http request Method in Salesforce

Kindly suggest me where I'm I going wrong, It works perfectly fine in cURL but when i try doing in in salesforce I'm facing all these Issues This is My cURL curl -H "Authorization:Bearer 7512d7f8-...
1
vote
2answers
495 views

cURL request equivalent to HTTP request in APEX

Scenario: Hello, I have a cURL string which needs to be converted to Http request to be called from apex. Problem: I am getting 400 Bad Request Error cURL: curl https://test.sagepay.com/api/v1/...
1
vote
1answer
830 views

why i am getting this error when sending data through curl

Error: call to URL https://cs31.salesforce.com/services/apexrest/CreateLoan/ failed with status 400, response HTTP/1.1 400 Bad Request Date: Sat, 27 Feb 2016 09:22:27 GMT Set-Cookie: BrowserId=...
1
vote
2answers
141 views

Force.com Rest API checking refresh_token if still valid or not

I am currently developing who requesting a rest api from salesforce. I am successfully getting a refresh_token as a response of my authorization with php curl. I want to know if is there any way to ...
2
votes
0answers
27 views

Posting Pdf to chatter via bulk api?

Which object should we use to post data's to chatter?I am trying to post a pdf file to a chatter object using curl. What is the name of the object that we should specify in txt file? <?xml ...
1
vote
1answer
74 views

Bulk Api:Storage limit exceeded

I am performing bulk api operations to load account records into salesforce using curl.I have a separate CSV file to do that job which consist of 5000 records.when I try uploading it, only 3500 ...
4
votes
0answers
391 views

Unsupported Content Type while using curl

We are currently working on with bulk api to load json data's into salesforce.But unfortunately we are not able to load it and getting error as unsupported content type does salesforce currently ...
1
vote
1answer
193 views

Include the -u CURL parameter in HTTP Request in apex

I want to make a request from salesforce to a CURL definition like this: curl https://sandbox-api.openpay.mx/v1/mzdtln0bmtms6o3kck8f/customers/ag4nktpdzebjiye1tlze/charges \ -u ...
3
votes
2answers
473 views

Salesforce REST API with PHP, INVALID_SESSION_ID after successful authentication

I connected my web app to salesforce and successfully followed all the steps in the web server OAuth flow to get an access_token and related info: https://developer.salesforce.com/docs/atlas.en-us....
1
vote
1answer
805 views

Get html source code with cURL in salesforce

Is there any way to get html source code of external url using cUrl or rest api. As in php we can get by using following code. $ch = curl_init("http://www.example-webpage.com/file.html"); curl_setopt(...
2
votes
1answer
425 views

Salesforce and CURL

I am a new Salesforce developer. I got an assignment where I have to get connected to an API using developer_id;developer_key The documentation says, Developer authentication involved sending a ...
0
votes
1answer
425 views

Problem getting AUTH Token

I'm trying to get an Auth Token (using PHP) and having trouble getting back the authorization code so I can make the next call and get the Auth Token. I set up a connected APP in the console and have ...
1
vote
0answers
435 views

Call Salesforce Apex Rest Post Method using PHP

The aim of this code is to call post method apex rest using php curl. But I am getting an error of response [{"message":"Unexpected parameter encountered during deserialization: Last Name at [line:1, ...
0
votes
1answer
365 views

Having Trouble with Force.com REST API oAuth2 Authentication

I am experimenting with Pat_Patterson's "Interact with the Force.com REST API from PHP". I am using PHP Version 5.6.3 , and I already registered my app via Setup->Create->Apps->Connected Apps. I setup ...
2
votes
1answer
850 views

OAuth Password Authentication for curl

I've seen this question on here numerous times, but none of the solutions I've found have helped. I'm trying to authenticate via curl. I set up a connected App, and retrieved the Client Id and ...
4
votes
1answer
636 views

Access token generation through curl

Org: Developer org. I faced a strange issue. I was generating the access token by providing client id, client secret, username and password. I used 2 following cURL commands : curl https://login....
2
votes
2answers
3k views

Obtain enterprise WSDL via curl

I am trying to obtain enterprise WSDL by accessing https://cs15.salesforce.com/soap/wsdl.jsp?type=* URL via curl. For this, I have obtained access token through OAUTH2 method via the following curl ...
1
vote
1answer
515 views

Using curl to download zip reports

I am attempting to use curl (or any other viable alternative) to download a zip report from SalesForce, but I seem to be unable to do so. I am using syntax: curl -o my_file.zip 'https://login....
2
votes
1answer
2k views

Novice Question: making a cURL callout from Apex to a 3rd party app?

I'm only familiar with REST and SOAP as API standards, and I'm a novice in general, so pardon my lack of understanding of most of these concepts. I have a web form on a third party heroku app that I ...
2
votes
3answers
660 views

How to use the REST API to get array from the Opportunity Object in JSON format from the Opportunity object using SOQL?

I'd just like to get an array of the opportunity data within Salesforce Visualforce so that I can manipulate it in Javascript. Below is the query that I'd like to use to pull in the array: select ...
2
votes
1answer
831 views

Why isn't curl getting the session id?

curl -v https://test.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=" -d "client_secret=" -d "username=" -d "password=" I've tried this with instance name instead of test ...
3
votes
1answer
1k views

ExactTarget REST API - Getting issues with /contacts/ and /campaigns/

I'm new with ExactTarget APIs, I'm using Php curl to request the ExactTarget REST API. Basically, I tried to create a contact: $array = array( 'contactKey' => 'test@test.fr', 'contactId' ...
3
votes
2answers
21k views

How to request rest api after getting access token. php & curl

I am able to authenticate with salesforce and receive a token using php & curl, below. However my next step is to use the token id to query salesforce (e.g objects) and i am not getting anything ...
3
votes
2answers
3k views

Sending data from PHP to Salesforce using CURL

I have to send the data from PHP to Salesforce and save the data in Salesforce. I have tried with the following code: $curlurl = "https://www.mysalesforce.com/services/apexrest/Contact?email={$...
2
votes
1answer
366 views

Rendering Email Thumbnail in Hub

Is it possible to make a cURL POST for an email thumbnail preview using the Authorization: Bearer header to a URL like this: https://www.exacttargetapis.com/guide/v1/emails/12345/EmailThumbnail ...