How do i activate a customer without a password?

How do i activate a customer without a password?

noisee
Shopify Partner
5 0 4

 

When a user signs up for our mailing list we create a customer (via admin api) and that process automatically emails the customer a link to activate the account/verify the email. This url has the customer id and the activation token in it.

 

What api entry point do i pass the id and token to finish customer creation? Everything relevant i have found requires a password. As this process works without password on our Liquid site it seems like it should be possible using an api.

 

Thanks.

Replies 4 (4)

Liam
Community Manager
3108 340 873

Hi Noisee,

 

You should be able to use GraphQL Admin API customerGenerateAccountActivationUrl mutation or the account_activation_url.json endpoint on the REST API for this. 

Liam | Developer Advocate @ 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

noisee
Shopify Partner
5 0 4

Hello,

 

Those endpoints generate the email (and the contained link). I was asking about handling the link there generated that has the user id and the activation token in it.

 

Liam
Community Manager
3108 340 873

Hi again - is this for a Hydrogen storefront?

Liam | Developer Advocate @ 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

noisee
Shopify Partner
5 0 4

Nope. We can use any of the other APIs.