Shopify 创建用户激活电子邮件

Shopify create user activation email

如何在使用 Shopify Storefront 时禁用激活电子邮件 API:https://help.shopify.com/en/api/custom-storefronts/storefront-api/guides/updating-customers#creating-an-access-token

{
  "input": {
    "email": "user@example.com",
    "password": "HiZqFuDvDdQ7"
  }
}

当我尝试添加时:

send_email_welcome": false

编辑:

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

我收到一个错误。

当我查看他们的商店时 API 它可以让您跳过激活电子邮件: https://help.shopify.com/en/api/reference/customers/customer#account_activation_url

我使用 ShopifyShart 解决了这个问题。事实证明,当您使用密码选项创建 Async() 时,可以在此处设置邀请电子邮件:

        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
            });