Questions tagged [curl]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
32 views

Calling REST APIs from PHP with curl

I've successfully received an access token thru the API, but no matter what I do I keep getting this "INVALID_SESSION_ID". Does this mean the access key is invalid? I've tried lots of suggestions from ...
0
votes
0answers
15 views

invalid grant authen failure curl call [duplicate]

I am following trailhead web service curl auth I can't get the OAuth to work. i creat app connect curl -v https://login.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=...
0
votes
1answer
31 views

SFMC API call to 3rd party when unsubscribing

We're using a 3rd party for a refer a friend service that also has a subscriber status. We'd like to link a user's unsubscribe to the 3rd party service when a user unsubscribes through the profile ...
0
votes
1answer
277 views

Persistant INVALID_AUTH_HEADER with curl on macos

I'm using curl to connect to a Salesforce org with OAuth (I'm following this tuto and get stuck at step 3): 1) Perform a User Agent OAuth request to get the session data below: { "access_token"...
3
votes
2answers
88 views

Help converting this cUrl to Apex?

I've already read and re-read the other posts here and here about cUrl to Apex. Those both dealt with only one parameter in the body of the request. This cUrl seems a bit trickier -- I can't seem to ...
0
votes
1answer
131 views

JSON with backslash for CURL. Not able to generate Apex request class

I have a request JSON that other system has given to use. It looks like below: { \"list\": [ { \"m1\": \"tval\", \"fill\": { \"tool\": \"4535\" }, \"respfield\": ...
3
votes
0answers
156 views

Salesforce Bulk API v2.0 INVALID_SESSION_ID

Following the Salesforce Bulk API v2.0 documentation at: https://developer.salesforce.com/docs/atlas.en-us.api_bulk_v2.meta/api_bulk_v2/walkthrough_upload_data.htm https://developer.salesforce.com/...
1
vote
0answers
232 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
85 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
138 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 ...
1
vote
0answers
347 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/...
1
vote
1answer
354 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
420 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
1answer
578 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
41 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
330 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
31 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
133 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
3k 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
4k 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
430 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
527 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/...
2
votes
2answers
582 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
173 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
758 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
243 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
593 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 ...
1
vote
3answers
1k 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
676 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
1k 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
163 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
33 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
112 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
527 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
228 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
677 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
1k 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
563 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
626 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
601 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
459 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
1k 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
894 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
4k 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 ...
2
votes
1answer
638 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....
3
votes
1answer
3k 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
785 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
1k 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
26k 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 ...