I always get the same, whether an e-mail is subscribed or not. The difference can only be seen in the backend on the contact page below subscriptions. How can I get the correct result if an e-mail was not yet used for a subscription?
[subscriptionStatuses] => Array
(
[0] => Array
(
[id] => {redacted}
[name] => One to One
[description] => One to One emails
[status] => SUBSCRIBED
[sourceOfStatus] => SUBSCRIPTION_STATUS
[brandId] =>
[preferenceGroupName] =>
[legalBasis] =>
[legalBasisExplanation] =>
)
Subscriptions: How to tell if an e-mail is subscribed or not?
If you go to Settings > Data Privacy, check if you have GDPR Tools enabled. If so, the next line “Legal Basis“ needs to be checked, too. Enabling only GDPR Tools without this check will lead to this bug (which is considered a feature by HubSpot).
It is not possible to make a decision only by consulting this service.
I recommend check the email exists in the contact base and then using that service... If you're looking for an e-mail outside the contact base, good luck. =(
Jul 28, 20219:22 AM - edited Jul 28, 20219:24 AM
Member
Subscriptions: How to tell if an e-mail is subscribed or not?
Hi Dennis,
that looks good with your account. Here, however, status is never NOT_SUBSCRIBED, no matter what e-mail address I use. This is an example with curl via the command line. I am pretty sure that krkrkrkrkrkrkrkr and so on with example.com as a domain is not an e-mail address in use. But even a test with e-mail invalid@invalid.test returns that this e-mail has status SUBSCRIBED. The API key is correct, it is possible to subscribe an address. It is simply that I cannot see whether someone is already subscribed or not.
% curl --request GET \
--url 'https://api.hubapi.com/communication-preferences/v3/status/email/krkrkrkrkrkkrkr@example.com?hapikey=REDACTED_KEY'
{"recipient":"krkrkrkrkrkkrkr@example.com","subscriptionStatuses":[{"id":"REDACTED_ID","name":"One to One","description":"One to One emails","status":"SUBSCRIBED","sourceOfStatus":"SUBSCRIPTION_STATUS","brandId":null,"preferenceGroupName":null,"legalBasis":null,"legalBasisExplanation":null},{"id":"REDACTED_ID","name":"Newsletter EN ","description":"Newsletter EN ","status":"SUBSCRIBED","sourceOfStatus":"SUBSCRIPTION_STATUS","brandId":null,"preferenceGroupName":null,"legalBasis":null,"legalBasisExplanation":null},{"id":"REDACTED_ID","name":"Marketing Information","description":"Marketing offers and updates.","status":"SUBSCRIBED","sourceOfStatus":"SUBSCRIPTION_STATUS","brandId":null,"preferenceGroupName":null,"legalBasis":null,"legalBasisExplanation":null},{"id":"REDACTED_ID","name":"Newsletter DE","description":"Newsletter DE","status":"SUBSCRIBED","sourceOfStatus":"SUBSCRIPTION_STATUS","brandId":null,"preferenceGroupName":null,"legalBasis":null,"legalBasisExplanation":null}]}