Skip to main content
Solved

Subscribing profiles for emails fails with message about phone number "not in a supported region"

  • December 20, 2023
  • 1 reply
  • 151 views

Forum|alt.badge.img+2

Hi,

I am getting some strange error messages from Klaviyo API. My code used to work but started to fail today with messages like this: “+16xxxxxxxx could not be subscribed due to Phone number is valid but is not in a supported region for this account." I am trying to subscribe only for emails, why does Klaviyo check the phone number?

I use Python Klaviyo API and I try to call method klaviyo.Profiles.subscribe_profiles(payload)

This is the payload:

payload = { "data": {    "type": "profile-subscription-bulk-create-job",    "attributes": {        "custom_source": "Marketing Event",        "profiles": { "data": profiles_data}    },    "relationships": { "list": { "data": {        "type": "list",        "id": list_id    } } }} }

 

This is definition of profiles:

profiles_data = []

data_profile = {    "type": "profile",    "id": profile['id'],    "attributes": {        "email": profile['email'],        "phone_number": ph_number,        "subscriptions": {            "email": { "marketing": { "consent": "SUBSCRIBED" } }        }    }}profiles_data.append(data_profile)

Can you please help me to understand what is wrong?

Best answer by Brian Turcotte

Hi @Evg7!

Just to clarify, you didn’t change anything about the code and it suddenly stopped working? I will reach out to the API team on this and get back to you ASAP.

 

Best,

Brian

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • December 21, 2023

Hi @Evg7!

Just to clarify, you didn’t change anything about the code and it suddenly stopped working? I will reach out to the API team on this and get back to you ASAP.

 

Best,

Brian


Reply