Http error 400 attempting to use $hubspot->emailSubscription()->updateSubscription()
SOLVE
I was not sending data by CURL, or not directly anyway, but using the methods detailed above. The warning about previously unsubscribed from all did not apply.
I've given up on getting that method working, I wonder if its deprecated?
I'm now using this instead - which does work, so I've worked around the problem.
Http error 400 attempting to use $hubspot->emailSubscription()->updateSubscription()
SOLVE
I was not sending data by CURL, or not directly anyway, but using the methods detailed above. The warning about previously unsubscribed from all did not apply.
I've given up on getting that method working, I wonder if its deprecated?
I'm now using this instead - which does work, so I've worked around the problem.
Http error 400 attempting to use $hubspot->emailSubscription()->updateSubscription()
SOLVE
Hi @NFortin, Are you sending the data by using CURL? If you JSON encoded your PHP var, what happens if you `print_r` the result? Would you be able to share that output?
There is a big warning in the documentation that tells you that you can not subscribe / unsubscribe a contact that you have unsubscribed before using `["unsubscribeFromAll" => true];`. Are you testing with another contact? Could be the issue as well.
✅ Did my answer solve your issue? Help the community by marking it as the solution.