Node SDK for performing REST, SOAP, Auth, and js object API calls with Salesforce Marketing Cloud Fuel.
npm install sfmc-fuelsdk-nodeFuelSDK-Node
============
Salesforce Marketing Cloud Fuel SDK for Node
npm install --save sfmc-fuelsdk-node
`
##### Step 2. Require the client
`js
const ET_Client = require('sfmc-fuelsdk-node');
`
##### Step 3. Instantiate the SDK
`js
const client = new ET_Client(clientId, clientSecret, stack);
`
or
`js
const client = new ET_Client(clientId, clientSecret, stack, {origin, authOrigin, soapOrigin}); // stack is ignored
`
##### or (For OAuth2 - Origin/AuthOrigin/SoapOrigin should be your Tenant Specific Endpoints. AuthOrigin is mandatory)
`js
const client = new ET_Client(clientId, clientSecret, stack, {origin, authOrigin, soapOrigin,
authOptions = { authVersion = 2, accountId = <>, scope = <>, applicationType = <>, redirectURI = <>}
});
`
##### Step 4. Consume the objects
`js
const props = {
name: 'Some test campaign name',
description: 'Campaign description'
};
client.campaign({props}).post((err, response) => {
// code
});
``