Shopify API - Create An Account Activation URL For A Disabled Customer

Shopify API 2023 – Create An Account Activation URL For A Disabled Customer

In Shopify, create an account activation URL for a disabled customer will allow the invited customer to transition from disabling the account to enabling the account by that URL. The customer needs to create a password to activate the account.

The account activation URL will be valid for once time use and will expire after 30 days.

Activating the account is very important because the Customer’s information is secure, and the payment process is fast.

So, in this article, Beehexa will help you create an account activation URL for a disabled customer.

Step 1: Generate API credentials from the Shopify admin

  • Log in to your Shopify admin
  • Go to Apps – Manage private apps
Generate API credentials from the Shopify admin
Shopify API 2023 - Create An Account Activation URL For A Disabled Customer 7
  • Click Create a new private app
  • In the App details section, enter a name for your app and an emergency developer email.
  • In the Admin API section, select the areas of your store that you want the app to access
Generate API credentials from the Shopify admin
Shopify API 2023 - Create An Account Activation URL For A Disabled Customer 8
  • Click Save

The Admin API section displays the app’s API key and password when you save the app’s details. 

Step 2: Create An Account Activation URL For A Disabled Customer

  • Log in to your Postman and create a new workspace
  • Create a new POST with this URL:
https://{username}:{password}@{shop}.myshopify.com/admin/api/{api-version}/{resource}.json
Code language: JavaScript (javascript)
  1. {username} – The API key that you generated.
  2. {password} – The API password that you generated.
  3. {shop} – The name of your development store.
  4. {api-version} – The supported API version that you want to use.
  5. {resource} – A resource endpoint from the REST Admin API.

Or you can copy this example in the Shopify Admin, remember to change {resource} to {customers/{customer_id}/account_activation_url}:

https://33a72f01e02987636e1c1a9a4e95c840:[email protected]/admin/api/2021-10/customers/5568649265215/account_activation_url.json
Code language: JavaScript (javascript)

customer_id=5568649265215

You can copy the customer ID after creating a customer using postman, or you can choose a customer in the Shopify Admin and choose a disabled customer that you want to activate. Then copy the customer ID in the URL. 

Example URL
Shopify API 2023 - Create An Account Activation URL For A Disabled Customer 9
  • Paste the URL above.
POST
Shopify API 2023 - Create An Account Activation URL For A Disabled Customer 10

Then click Send

Response:

The API will return the account activation URL for the customer.

{ "account_activation_url": "https://hexasync.myshopify.com/account/activate/5568649265215/38523bc5305161598f2d7199210fc6f2-1640769456" }
Code language: JSON / JSON with Comments (json)
response
Shopify API 2023 - Create An Account Activation URL For A Disabled Customer 11

Step 3: Verify The Result

Choose the URL by pressing ctrl and clicking the link in the response

result
Shopify API 2023 - Create An Account Activation URL For A Disabled Customer 12

As you can see, the URL has been created successfully. The customer only creates a password to activate the account. 

I have shown you all steps to create an account activation URL for a disabled customer with Shopify API using Postman. If you have any questions, please leave a comment below or refer to our Devdocs

If you still do not understand the tutorial’s content, you can watch the video below for a more overview.

Shopify API – Create An Account Activation URL For A Disabled Customer

Hopefully, you can do it!