Questions tagged [php]
PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language.
317
questions
2
votes
1
answer
934
views
Calling Marketing Cloud APIs from PHP via FuelSDK
I am using PHP FuelSDK installed with composer. I followed this guide to create the clientid and clientsecret:
http://www.calvinfroedge.com/salesforce-how-to-generate-api-credentials/
Here is my ...
0
votes
1
answer
186
views
$Lightning.use() function with access token
Hello Community Experts,
Whenever I use the access token into the $Lightning.use() function, It will give the Invalid session ID error and my component will not load on an external site.
I have ...
0
votes
1
answer
2k
views
Trouble getting VersionData from ContentVersion through REST API - always returns null
I am trying to retrieve the binary file data from a ContentVersion. As i understand it, you get this from making a GET request to the value that is stored in VersionData on ContentVersion. For me it ...
0
votes
1
answer
974
views
Pass values from php from to the salesforce [PHP Integration]
I Have a generic PHP Application Form which has around 20 fields(say First Name,Last name,Mobile,Position etc ) .I am integrating this form to create a record in salesforce.
How can i pass the values ...
2
votes
1
answer
898
views
How do you unsubscribe a subscriber from just one list
I'm new to Salesforce development and specifically Exacttarget development. I need to write a custom opt-out page (that can be branded). So when a user clicks "Unsubscribe" they are taken to a company-...
0
votes
3
answers
3k
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 ...
2
votes
1
answer
787
views
Email Send Definition using Data filtered Data Extension
I try to set an Email Send Definition with a Data Extension which is filterd by a Data Filter (exclusionlist). Sending without the Data Filter is no problem but after applying the Data Filter it ...
1
vote
1
answer
162
views
Web flow and access/refresh tokens via php
I'm trying to implement a web flow authentication process using php; so far, I've created the necessary index.php file which is used to get the first code:
// Generate a random code verifier
$...
0
votes
1
answer
597
views
How To POST Request To PHP Endpoint And Process Values
I'm trying to send data from Salesforce to an endpoint hosted on an external server. The endpoint is written in PHP that will insert a new record into an external MySQL database.
I've got the ...
1
vote
1
answer
150
views
Installing workbench in an environment without composer - cannot find ../vendor/autoload.php
Error:
Warning: require(/apache/htdocs/workbench/../vendor/autoload.php): Failed to open stream: No such file or directory in /apache/htdocs/workbench/shared.php on line 2
Fatal error: Uncaught Error:...
0
votes
1
answer
664
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 ...
0
votes
0
answers
102
views
Insert data to a multipicklist using PHP API Call
I am new to SalesForce. I am trying to create a new "Account" object in SalesForce using PHP API call.
This works perfectly when I am not passing values to the multipicklist. When I pass ...
2
votes
2
answers
3k
views
Trigger Welcome Email after adding new subscriber via API?
I have a web form that adds subscribers to a list via the API but because i'm using the API rather than web collect it won't send out the welcome email. How would I send send the welcome email via api?...
0
votes
1
answer
679
views
PHP FuelSDK with Account: Unable to Auth
I am unable to get authenticated. I've copied/pasted the ID and secret.
Error that I am receiving is below:
Warning: First parameter must either be an object or the name of an existing class in C:\...
0
votes
1
answer
657
views
Can't connect to MySQL on heroku
The connection to my ClearDb via WorkBench on my local computer or via PHP (on local comp too) works fine.
But it doesn't works after deployment my PHP program on Heroku - if I run Deploy/View it ...
0
votes
1
answer
796
views
Performing a query via REST-API - Solve encoding problems
I am using Guzzle as my PHP HTTP client to perform api-calls.
This worked great so far, for retrieving my access-token for example.
However, now that I am trying to perform a query search I get a ...
1
vote
1
answer
933
views
Add Remote Site Setting via API
I am trying to add a new Remote Site Setting via API. I am using core PHP. After I run the following code I am getting this error.
$response = [
0 => {
"errorCode": "NOT_FOUND&...
1
vote
1
answer
582
views
Need Help debugging - Exception occurred during [ScheduleEmailSendDefinition]
I have the following code, which I found and updated. Initially I tried the code example from http://help.marketingcloud.com/en/technical_library/web_service_guide/technical_articles/...
5
votes
1
answer
1k
views
Force.com Toolkit for PHP - Still Officially Supported?
Looking at the current websites here:
https://developer.salesforce.com/page/PHP_Toolkit
https://github.com/developerforce/Force.com-Toolkit-for-PHP
I wonder if the toolkit is still supported? Seems ...
0
votes
2
answers
160
views
REST API Integration Error: Invalid conversion from runtime type List to Map\n\n(BMCServiceDesk)
I am creating an integration to open a Service Request in my salesforce instance (remedyforce application).
I created the file below, I've had several errors and corrected it until I didn't give any ...
0
votes
0
answers
56
views
salesforce toolkit php create duplicate records
I am using salesforce toolkit PHP to create an Opportunity. Everything works great but I random duplicate record creation which is driving me crazy. Does anyone know how to fix this problem? I can't ...
1
vote
0
answers
78
views
Sub account not work API Soap PHP
I have a problem to point a subaccount in the PHP SOAP API, where can I make this note?
My Code:
include LOCAL_SYSTEM . 'application/src/Plugins/Exacttarget/exacttarget_soap_client.php';
include ...
1
vote
1
answer
303
views
Update field in salesforce - php sforce
I am trying to update a field in salesforce and for some reason it doesn't do anything.
here is my code:
class Salesforce {
private static $mySforceConnection;
private static $instance;
...
7
votes
2
answers
5k
views
REST API: "INVALID_SESSION_ID" with valid token
I'm having some trouble accessing API endpoints using a valid token that I just got from the OAuth process.
I'm passing data as I think I should and am trying to access any endpoint at this point (...
1
vote
0
answers
296
views
Access REST API with Connected-App and JWT Bearer Token Flow
I read this article and created php demo script.
https://help.salesforce.com/articleView?id=sf.remoteaccess_oauth_jwt_flow.htm&type=5
Environment: Sandbox
OAuth Scopes: api, refresh_token, ...
2
votes
1
answer
5k
views
Salesforce REST API Connection is always Invalid Client Credentials
I'm using this to get a starting point token:
session_start();
require '../config.inc.php';
$token_url = "https://test.salesforce.com/services/oauth2/token";
$params = [
"...
0
votes
4
answers
2k
views
Salesforce PHP API : INVALID_LOGIN
I am working with Salesforce PHP API(https://developer.salesforce.com/page/PHP_Toolkit_20.0_Samples) to retreive and update information. But do get the INVALID_LOGIN error when trying to execute if ...
1
vote
2
answers
3k
views
Salesforce OAuth 2.0 JWT Bearer Token Flow with PHP
Anyone can help me with JWT Token Flow returning an error of
{"error":"invalid_client","error_description":"invalid client credentials"}
Why am I getting this error ? I suspect that I uploaded a ...
0
votes
1
answer
7k
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 ...
1
vote
1
answer
386
views
Scheduling emails using Email Send Definition and Data Extension
We are currently building an integration where when a product is purchased on Shopify the user can select a date and time to schedule the product to be emailed to a specific email address (e-card ...
1
vote
2
answers
896
views
Modifying data using SOQL?
I'm using SOQL along with the SOAP API in order to pull a certain set of data to my webpage. However, I want to modify this data (two custom fields) and update the records in Salesforce itself. As I ...
6
votes
1
answer
1k
views
Returning Oauth token with REST API via PHP arrays when trying to send new contacts
In the salesforce REST API documentation, it tells how the system can give Oauth Tokens (https://code.exacttarget.com/apis-sdks/rest-api/v1/auth/requestToken.html )
But I don't see any documentation ...
1
vote
1
answer
478
views
How to associate a lead with a campaign by php salesforce api
I can create lead via salesforce php api toolkit , by my client said every lead should be associated with a campaign , and he gave me a campaign id . The campaign id is similar to something like this "...
5
votes
3
answers
3k
views
Decrypt a string encrypted by the EncryptSymmetric() AMPscript function using PHP
I read elsewhere in StackExchange that it's not possible to decrypt AES strings originating from AMPScript in PHP. Is this true? It seems that it should be possible with mcrypt.
Also, part two for ...
0
votes
1
answer
410
views
ExactTarget Enterprise PHP/API How do I select the Enterprise Unit ID
We have used the PHP code to do Trigger Send Definition with the Standard edition for the past 2 years now, and work very well.
Now we are moving to the Entreprise edition and I was told by ET ...
0
votes
1
answer
394
views
List all attributes of a subscriber list
I am working with the marketing cloud web service API and I am trying to locate a method that returns a list with all attributes of a subscriber list (like: FirstName, LastName, Gender, and so on)
...
1
vote
1
answer
294
views
Download Attachment using php is not working for xlsm files
I'm using the below php code to save the Attachment to my server.
public function getAttachmentFileFromSalesForce($fileName, $fileBodyUrl)
{
try {
$authCode='';
$...
1
vote
1
answer
395
views
Is it required to create parent and child records in single Salesforce create call of PHP toolkit?
When we are storing parent and child records in single salesforce create call using PHP toolkit is it required the External_ID_Field__c same name in both objects? or we can use any field which is ...
0
votes
1
answer
149
views
Can I open page(NON-Visualforce) by POST method?
We want to open page(NON-Visualforce) by POST method.
User open Visualforce page, and click 「submit」 button.
This button call Apex class( or js? ) , other page open by POST method.
Other page is ...
0
votes
1
answer
239
views
Increase max retrievable items from PHP
Good Day All,
I am using a soapclient to access data from salesforce to php, and was able to retrieve data more than a thousand, however, php was only able to display 1000 but it did say that the ...
0
votes
1
answer
608
views
Apex equivalent of PHP sha1() and some more encoding methods
I got a PHP script to generate an encoded URL.
I need to translate this script into Apex code to generate the same URL. However, the PHP encode functions seem to work differently from Apex.
The ...
0
votes
1
answer
1k
views
Retrieve Data Extension based on ObjectID using SOAP API
Using the Marketing Cloud API I'm trying to programmatically determine the fields in an event definition. So...
I can start with the ID of the journey and get the journey definition with /...
0
votes
1
answer
424
views
How to add or remove subscriber from auto suppression list using php sdk [duplicate]
I don't see a method built in the existing php sdk to add or remove subscriber from the auto suppression list, can somebody please share the same if you have it developed
1
vote
1
answer
522
views
Can I get a refresh_token using cURL from the command line, or in Salesforce.com itself?
I have a web server which uses Salesforce's REST API from PHP. It needs permanent access, to occasionally do things like create opportunities, accounts, and other objects.
I don't want to store my ...
0
votes
2
answers
119
views
Connect an apex trigger to an authorized user's account
I'm authorizing users through oAuth (Connected app) via a PHP app. I then want to enable an Apex trigger on every user's account; in short, I want to send all contacts to my app as they're added. I ...
1
vote
1
answer
108
views
Required fields are missing: [TopicId]
I tried to insert data to salesforce but it returns
Required fields are missing: [TopicId]
Here is my code in inserting the data:
$tObject = new Stdclass();
$tObject->EntityId = '...
0
votes
1
answer
526
views
PHP OAuth 2.0 JWT Bearer Token Flow
I am trying to obtain a JWT Bearer Token from Salesforce. I am trying to follow their documentation but am however unsuccessful. https://help.salesforce.com/articleView?id=remoteaccess_oauth_jwt_flow....
4
votes
3
answers
18k
views
What is the maximum number of records I can send per RESTful API call?
There is a maximum batch size for the number of records returned by an API call.
Most of the documentation for the API calls reference including a .json file, and some, like the Update a Record page,...
1
vote
1
answer
388
views
Single items are all in on XML field when using PHP SOAP API
That's the snippet from it.
$query = "SELECT Id, Body, Status from Idea";
//print_r($query."</br>");
$response = $mySforceConnection->query($query);
// QueryResult object is only for PARTNER ...
0
votes
2
answers
620
views
Fuel-SDK: How to upsert (UpdateAdd) DataExtension row
PHP's startker-kit has an UpdateAdd save action, which basically inserts a row if its ID doesn't exist and updates it if the id exists.
Is there an equivalent in PHP's Fuel-SDK? Or do I need to write ...