Development discussions around Shopify APIs
I tried to change the customer state by calling the customer API, with PUT method. It is not working. Seems like getting the customer enabled is possible only by sending account activiation URL. How do i achieve this without initiating accountactivation URL?
Hey @eCommExplorer
Yes, customer state is a read only value in REST(docs) but you should be able to get there by trying this, a HTTP Post to customers.json.
{
"customer": {
"first_name": "Steve",
"last_name": "Lastnsameson",
"email": "coolemail@email.com",
"phone": "+15149146011",
"verified_email": true,
"addresses": [
{
"address1": "123 Oak St",
"city": "Ottawa",
"province": "ON",
"phone": "555-1212",
"zip": "123 ABC",
"last_name": "Lastnameson",
"first_name": "Mother",
"country": "CA"
}
],
"password": "newpass",
"password_confirmation": "newpass",
"send_email_welcome": false
}
}
This workaround will return a customer with an enabled state. Hope that helps!
Hi, This is to create new user, I want to change existing customer state from "disabled" to "enabled" without sending an activation URL.
If this is not possible, is it possible to send a mobile app deep link as account activation URL? how do I initiate different deep link for andriod and IOS?
Hi, Did anyone find any solution to this? Possible to do this programatically?
Yes, you just need to send a post request to that specific customer account with the fields password, password_confirmation, send_welcome_email and that will activate the account.
Hi, is there any solution for this?
Same here, tried but not working any solution?
Hey @stephanss, you could use the activatebyURL mutation in our Storefront GraphQL API to force a customer state status update. You would still need to capture the activation URL that's generated upon customer creation, but if you push the GraphQL call and include a password for the customer, it would effectively set their status to "active".
It can speed up the process, so that you're able to activate the customer without them having to click through the email activation link themselves. Hope this helps - let us know if we can clarify anything on our end!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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
When using the activatebyURL mutation, can we silence the account confirmation email?
Hey @icedcapp!
The confirmation email mentioned helps ensure account security using a verification link that is sent, however we did a bit more of digging and found reference where the confirmation email can be disabled via a merchant request to Shopify Support. Looking at previous posts in the forums, there was mention of some configurations that are only be available to Plus stores, so either way we would suggest connecting with support to confirm if it is an option for the store you are working on.
Cheers!
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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
User | RANK |
---|---|
10 | |
4 | |
3 | |
3 | |
3 |
As a business owner, have you ever wondered when your customer's first impression of yo...
By Skye Jun 6, 2023We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023