Customer API Verified Email

Solved
cramipeg
Tourist
5 0 2

Hello, I've been using Shopify's customer API and been running some test, I created a fake account and it when I call the endpoint customers it returns this:

"customer": {"id": 2558592745538,"email": "ddddddd@ff.com","accepts_marketing": true,"created_at": "2019-10-14T15:34:12-04:00","updated_at": "2019-10-14T15:35:05-04:00","first_name": "Carlos","last_name": "Desarrollo","orders_count": 0,"state": "enabled","total_spent": "0.00","last_order_id": null,"note": "","verified_email": true,"multipass_identifier": null,"tax_exempt": false,"phone": "+18095555555","tags": "approved","last_order_name": null,"currency": "DOP"

 

"email": "ddddddd@ff.com" is a fake email yet it returns under "verified_email" = true.

 

Why is this? how could I fix it?

0 Likes
vix
Shopify Staff
Shopify Staff
534 105 103

 

Hi @cramipeg 

 

Shopify validates emails in two ways, first with valid form and syntax. Next, we validate that the domain has a valid MX record. You can check these emails through one of the many online MX record lookups. Although you have made this email up, the domain does actually have MX records and therefore is able to be delivered mail. Without an MX record, there would be a certain failure, so this is the one main area we are checking for email.

Vix | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
cramipeg
Tourist
5 0 2

Hi Vix, thanks for answering yet when reading the documentation of the customers API it says that: 

"verified_email": true :  Whether the customer has verified their email address.

Also this is the same answer a developer from an APP I'm using gave me, that verified_email it's set to true when the customer verifies their email by clicking the "verify button" in the email that they get when registering in a store, if we go by your answer(I know that's they way is actually working right now) then this button does nothing.  

0 Likes
vix
Shopify Staff
Shopify Staff
534 105 103

This is an accepted solution.

 

Hi @cramipeg 

 

Apologies, I thought you were asking about email validation vs. the verified_email field. verified_email is almost always true — it is only false when a new customer is created by signing up for an account on the storefront and hasn’t yet clicked the account activation/password reset link in their email. This means that customers created through the admin or the API will return true. I will update the docs for clarification. 

Vix | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
ManuelGomes
Tourist
6 0 2

This is a bit odd. At least, via the API, we should be able to change the value of verified_email.

I am editing a customer, changing the email address AND also verified_email to false, and verified_email always remains as it was.

This means that the field has effectively no meaning, or is there a way to edit it via API?

gustavonecore
New Member
1 0 0

Hey @ManuelGomes have you resolved this issue?
I'm facing the same issue, since I'm adding this "create customer" call from a custom backend for new users, but the emails are not verified at all, but the API says "yes", and also send me a welcome email, nothing related to "Confirm your email" or the standard flow for this.

 

What can we do to approach this?

 

0 Likes