-
Notifications
You must be signed in to change notification settings - Fork 504
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
POST /lists/list_id/members/sub_id/tags fails: This value should be of type iterable. #305
Comments
When formatting it like this:
It seems to be correctly formatted. Except mailschimp now complains that the field "name" is required - even though I clearly filled it in (I even tried hardcoding the
|
did you find a workaround for this ? |
Also getting this issue |
I believe its due to https://github.com/drewm/mailchimp-api/blob/master/src/MailChimp.php#L390 when it is encoding the array of tags it is creating a JSON object instead. |
I've got it working by doing this [
'tags' => array_values($tags),
] Which seems to trigger it to encode correctly 🤞 |
I tried this snippet but it didn't work. It creates the tag on mailchimp and the user doesn't receive the mail.
How can I subscribe a user with a specific tag? |
Ok, here is the code that seems to work for me
|
Mailchimp documentation:
https://mailchimp.com/developer/api/marketing/list-member-tags/add-or-remove-member-tags/
Code:
output:
When I double wrap the tags (so it becomes an array of arrays), mailchimp complains that it should be a string. What does mailchimp actually want from me? Is this a bug?
The text was updated successfully, but these errors were encountered: