Integrating Shopify to a Unity App

ChrisGraf
Tourist
5 0 0

Hello everyone, 

     I have made a basic prototype for a very simple application made with Unity to sell some physical products. I want to integrate Shopify so users can make a purchase. Reading the documentation it says I need an access token from my Shopify app. There are private apps, custom apps, and public apps, but I have searched and asked and cannot find a definite answer of which one to make for my needs.

 

The only things that I 100% need are:


1. Integrate with Unity
2. Be able to access more than one SHOPIFY store within my Unity app
3. Be able to put the app on Apple's App Store and Google Play

Could a fellow developer help me out with this? The coding and actual app making I can handle, but it is the Shopify Store rules that I need some assistance with. Thank you very much. 

- Christopher

0 Likes
hassain
Shopify Staff (Retired)
Shopify Staff (Retired)
624 103 136

Hey @ChrisGraf ,

 

I am assuming you already familiar with the Shopify Storefront API Unity SDK (https://shopify.dev/tools/libraries/storefront-api/unity), and at this point are just curious at how to get the Storefront Access Token to configure this SDK?

 

Firstly, if you want your project with the Unity SDK to access multiple Shopify stores then you need to make a Public Shopify app first from the Shopify Partners Dashboard (don't worry - you do not need to have this app listed on the Shopify App Store if you do not want). Then turn your app into a Sales Channel (turn the app into a sales channel). 

 

Then build out your Public Shopify App so that it can be installed onto Shopify stores and so that it can request the necessary "unauthenticated_" access scopes from merchants required to use the Storefront API. (You can build your Public Shopify App in any language, but here are guides on how to do this in Node.js and in Ruby)

 

Once your Public App is now installed on a Shopify store, and that merchant has granted access to all of the "unauthenticated" access scopes you need, your Public App can now make the following POST request to generate a Storefront Access Token for this specific store: POST {store-name}.myshopify.com/admin/api/2020-01/storefront_access_tokens.json 

 

This Storefront Access Token can now be used in the Unity Buy SDK to sell physical products for that specific store

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
SylvainStg
New Member
2 0 0

@ChrisGraf did you find out how to convert your app into a sales channel?

The documentation about creating private application at https://shopify.dev/docs/storefront-api/getting-started mentions "After you've created an app from your Partner Dashboard, you can go to App setup and turn the app into a sales channel."

Nowhere I find how to achieve this when I look at the private app details.

Any hints? 

Thanks!

0 Likes