Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Please provide a consent to track value." response when subscribing via XMLHttpRequest #11

Closed
jpcarpenter opened this issue Nov 24, 2020 · 1 comment

Comments

@jpcarpenter
Copy link

While attempting to submit a subscribe form via XMLHttpRequest, the response returns a 404 with the following message:

reason: "Please provide a consent to track value."
statusCode: 400
success: false

I investigated within the CM API docs, and found that by adding a ConsentToTrack option to the subscriber list service, the response returns successfully. Below is where I added the option:

 $subscriber = array(
   'EmailAddress' => $email,
   'Name' => $fullName,
   'CustomFields' => $additionalFields,
   'Resubscribe' => true,
   "ConsentToTrack" => "Unchanged"
);

Once added, the subscribe functionality works as expected.

@heymarkreeves
Copy link
Member

This has been addressed in #10, which updated the create-send library to resolve PHP's deprecated use of curly braces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants