Generating a Shopify Access Token for App Development

Shopify Access Token

Many online stores have different business models to digitize and deliver a custom experience - giving them a competitive edge. The aim of these enhancements is to promote better, communicate more clearly, and have better ways to enhance conversions and tools to give a better post-purchase experience. Many of these tools are built through a Shopify App, which developers can deliver in a Shopify Custom App, or Shopify Private App. Many of the Shopify Apps use the Shopify API for the purpose of using data such as customers, orders, products, shipping information, and finances. Store owners integrate their online store with other systems such as Enterprise Resource Planning (ERP) such as Veeqo, or QuickBooks, and other tools so that their Shopify Store delivers the best cost-optimized experience.

Types of Shopify Apps

There are two types of App development in Shopify, Private Apps that are purpose-built for that particular Shopify website, enhancing the capabilities of that store for a business goal. Shopify Custom App or Shopify Public App is where a web developer or agency places the App in the Shopify App store to make available to all Shopify store owners to access, configure and use - free or for a small fee. The effort in a Shopify public App is very different than a Shopify Private App when it comes to the development approach, as well as getting the Shopify App vetted by Shopify.

Preparing for an App Development phase

  1. To create an app, you must register for a Shopify Partner account.
  2. When logged in, your Shopify API Keys will need to be created. The options that you go through are self-explanatory, however, when reaching the Application Callback URL, the domain name that you are working on will need to be entered. Shopify will only send tokens to that domain.
  3. Click on Apps then Create App on the left navigation bar. Enter a Shopify App name that will suit, /install.php affixed to the domain name. Local development requires entering HTTP://localhost/install.php. You might need to set the port number if you aren't using port 80.
  4. Once the App is created, click on the App Info Tab, find Whitelisted Redirect URL's add the domain name as in step 3 affixed by /generate_token.php. With local development, you will be adding HTTP://localhost/generate_token.php.
  5. Within the same page, scroll to the bottom of the page and you will note that there is a section called "API Key" and "API Secret Key" - you will need the credentials of these two to proceed further. keep these handy.

Creating the Shopify Access Token

Store authentication must be established to access the store via the API. The store owner has to approve your app and assign the right permissions - create a new product through a process called OAuth which is a secure and common method used in Shopify Apps, most software developers will know of this method.

  1. Shopify Store information gathering: When a Shopify store owner looks to install your app through the Shopify App store, a call to your Shopify App URL will be received with the status of "Pending". The value of the Shopify parameter will be the store domain name (store.myshopify.com with "store" being the store name).
  2. Installation approval: once you have the store domain name, a page needs to be available for the user to approve the App.
  3. Capture the Access Code: if the user has approved the installation, an authorization code will come back as a query string. The part before the "?" should contain the part you had included, and behind it should include "code", "hmac" and a "timestamp" where the "code" is the authorization code that is used in the OAuth process. the other two parameters are used to validate that the call is generated by Shopify.
  4. We now have all the elements to generate the Shopify Access Token - the Shopify API Key, the API Secret Key, and the Access Code from step 3. Don't forget that the Shopify Access token expiration does have a time limit and might require re-generating.
  5. You can now make your API calls with Shopify.

Summary

While this is a general outline to achieve your Shopify Access code and be able to reach the Shopify API, store App development is not restricted to only the Shopify App store, it can also be used in Mobile App development in IOS/Android. App Design using mobile platforms can be very powerful when it comes to a custom experience and can be cross-platform as well. Mobile devices are the most accessible device today to interface with your Shopify store. While web design does make a store easy to navigate, an IOS/Android App is quicker and more secure to access in most cases. It does require technical skills to be App developers, small businesses look to have pre-built Shopify Apps while larger companies can afford a larger budget to go custom. If you have any questions regarding Shopify App development, feel free to reach out to us at wish@thegenielab.com


Leave a comment

Please note, comments must be approved before they are published

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.