【问题标题】:Shopify create user activation emailShopify 创建用户激活电子邮件
【发布时间】:2019-02-21 18:13:55
【问题描述】:

如何在使用 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
                }

我收到一个错误。

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

【问题讨论】:

  • 您是否将 send_email_welcome": false 放在“输入”块之外?
  • 是的。试过了。我仍然收到欢迎电子邮件。我还有一个问题,如果通过单击激活电子邮件激活用户后,是否有办法将用户重定向到自己的自定义商店

标签: c# shopify shopify-app


【解决方案1】:

我可以使用ShopifyShart 解决这个问题。结果是,当您使用密码选项 CreateAsync() 时,可以在此处设置邀请电子邮件:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-02
    • 2018-04-19
    • 2017-06-22
    • 2020-02-15
    • 1970-01-01
    相关资源
    最近更新 更多