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

Shopify API 2024 – 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

     

      • Go to Apps – Manage private apps

    Generate API credentials from the Shopify admin

       

        • 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

         

          • Click Save

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

        Shopify Connector and Profile arrow WooCommerce
        Shopify Woocommerce Integration
        Shopify Connector and Profile arrow Close
        Shopify Close Integration
        Shopify Connector and Profile arrow Sage Accounting
        Shopify Sage Integration
        Shopify Connector and Profile arrow Vend POS
        Shopify Vend-pos Integration

        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

             

              1. {username} – The API key that you generated.

              1. {password} – The API password that you generated.

              1. {shop} – The name of your development store.

              1. {api-version} – The supported API version that you want to use.

              1. {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: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@hexasync.myshopify.com/admin/api/2021-10/customers/5568649265215/account_activation_url.json

            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

               

                • Paste the URL above.

              POST

              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"
              }

              response

              Step 3: Verify The Result

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

              result

              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.

              https://youtu.be/KHa43K8cZVk
              Shopify API – Create An Account Activation URL For A Disabled Customer

              Hopefully, you can do it!