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:[email protected]/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!