1
votes

How can one disable activation email when using Shopify Storefront API: https://help.shopify.com/en/api/custom-storefronts/storefront-api/guides/updating-customers#creating-an-access-token

{
  "input": {
    "email": "[email protected]",
    "password": "HiZqFuDvDdQ7"
  }
}

when I try adding:

send_email_welcome": false

EDIT:

                Variables = new
                {
                    input = new
                    {
                        email = model.Email,
                        password = model.Password,
                        firstName = model.FirstName,
                        lastName = model.LastName
                    },
                    sendemailwelcome = false
                }

I get an error.

When I look at their Store API it lets you skip activation email: https://help.shopify.com/en/api/reference/customers/customer#account_activation_url

1
did you put send_email_welcome": false outside the "input" block?João Paulo Amorim
Yes. Tried that. I still get Welcome email. Another question I have if there is a way to redirect a user to own custom store after user is activated by clicking on the activation emailShaneKm

1 Answers

1
votes

I was able to solve this using ShopifyShart. Turns out when you CreateAsync() with password options an invitation email can be set there:

        var data = await m_service.CreateAsync(new Customer
            {
                Email = user.Email,
                FirstName = user.FirstName,
                LastName = user.LastName
            },
            new CustomerCreateOptions
            {
                SendEmailInvite = false,
                SendWelcomeEmail = false,
                Password = password,
                PasswordConfirmation = password
            });