Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $url = 'https://www.exacttargetapis.com/contacts/v1/contacts';
- $json = '{
- "contactKey": "test@example.com",
- "attributeSets": [{
- "name": "Email Addresses",
- "items": [{
- "values": [{
- "name": "Email Address",
- "value": "test@example.com"
- }]
- }]
- }]
- }';
- $options = array(
- 'http' => array(
- 'header' => "Content-Type: application/jsonrn" .
- "Accept: application/jsonrn" .
- "Authorization: Bearer " . $access_token . "rn",
- 'method' => 'POST',
- 'content' => http_build_query($json)
- )
- );
- $context = stream_context_create($options);
- $result = file_get_contents($url, false, $context);
- if ($result === FALSE) { echo "Result not returned"; }
- print_r($result);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement