Jump to content

How to use Salesforce Marketing Cloud API to connect with my SQL server?


Recommended Posts

I need to use C# to do an HTTP POST request to acquire an access token, but I have no idea how to do it. Salesforce Marketing Cloud is a customer relationship management (CRM) platform for marketers that allows them to create and manage marketing relationships and campaigns with customers. I need to run this sample code in C#:

POST https://auth.exacttargetapis.com/v1/requestToken
Content-Type: application/json

{
"clientId": "gyjzvytv7ukqtfn3x2qdyfsn",
"clientSecret": "************"
}

I am using SSIS 2008r2, I want to write c# code to make an API call to the exact Target API to connect to the SQL server database. Because I want to pull data from the SQL server to the marketing cloud. I didn't find any article about using SSIS to connect Marketing cloud.....the salesforce marketing cloud rest API or FuelSDK looks like it only supports .net 4 or higher.

Link to comment
Share on other sites

  • 3 weeks later...

Hi! The best way to accomplish this would be to use the C# HttpClient library to make an HTTP POST request. This is a sample code snippet that you can use:

using System;

using System.Net.Http;

using System.Text;

using Newtonsoft.Json;

namespace SampleCode

{

class Program

{ static void Main(string[] args)

{

// Create an HttpClient object

HttpClient httpClient = new HttpClient();

// Prepare the request body data

string requestBody = "{\n" +

"\"clientId\": \"gyjzvytv7uk

Recommend read this blog https://mlsdev.com/blog/app-development-cost

Edited by michaelalyermo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...