Solved

Issues with invalid of unsupported phone number from the API

  • 24 October 2022
  • 7 replies
  • 787 views

Userlevel 1
Badge +2
  • Problem Solver I
  • 11 replies

I’m using the latest stable API (version 2022-10-17) to create a profile and I’m running into issues with the phone number.  I understand it needs to be E.164 compliant which my numbers are, but I’m running into an issue with fake phone numbers. 

For example this phone number won’t work:
+14161112222

But this one will:
+14168902222

According to the E.164 guidelines both numbers should be correct.  Why is the first one failing for me?

The error response is:
"detail"=>"Invalid or unsupported phone number",
"source"=>{"pointer"=>"/data/attributes/phone_number"}

And I’m using the endpoint for create:
https://a.klaviyo.com/api/profiles/

 

icon

Best answer by alex.hong 25 October 2022, 22:16

View original

7 replies

Userlevel 7
Badge +58

Hi there @Chops ,

Welcome to the Community.

That is bizarre indeed. If both API calls are the same minus the phone number, there shouldn’t be a reason for one call to work vs the other. I will reach out to colleagues and see if there is anything to report on this.

 

Best,

Alex

Userlevel 7
Badge +58

Hi @Chops ,

The first number is fake (hence why it's invalid). Do you also think the second one is also fake? I have checked and it's legitimate (hence why it's working). You can run them both through here: https://www.phonevalidator.com/results.aspx

Userlevel 1
Badge +2

Thanks for the answer, we’ll probably have to wire up Twillo verification on phone inputs now.  Bit of a side-step for us in terms of our use case but it seems like there is no other option.  It should be noted in your docs though, saying E.164 compliant isn’t the whole picture.  It’s E.164 + a valid phone number.  It’s an extra cost to us so would be nice to know ahead of development.

Thanks.

Badge

Same issue here. Our workaround it to just skip the phone number if we get an invalid error from Klaviyo. This was you don’t have to use Twillio to check the phone number validity @alex.hong since Klaviyo does it for you :)

Badge

I’m having the same issue with a valid phone number using the 2022-10-17 API endpoint.

Data in question

{
'phone_number': '+1330219####'
}

Error response

{
'id': '851832d9-38b1-403c-9833-d8e27def81df',
'status': 400,
'code': 'invalid',
'title': 'Invalid input.',
'detail': 'Invalid or unsupported phone number',
'source': {
'pointer': '/data/attributes/phone_number'
},
'meta': {}
}

 

Userlevel 1
Badge +2

The error you’re seeing is because your phone number needs to be valid.  If you run the phone number through this validator does it come up as verified?  If so then you’ll need to reach out to Klaviyo. 

 

For our purposes right now we’re not going to import phone numbers.  The extra verification step isn’t worth it right now.

Badge

Hi,
I’m having the same issue with valid phone numbers checked on https://www.phonevalidator.com/

this is the error I got:

{"errors":[{"id":"ec3024fd-da00-490f-8c79-62eb7e0b6df3","status":400,"code":"invalid","title":"Invalid input.","detail":"Invalid or unsupported phone number","source":{"pointer":"/data/attributes/phone_number"},"meta":{}}]}

Can you please investigate if it’s something on Klavyo side? We tried several real phone number with or without phone prefix and no one was working.

Thanks

Reply