Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Requests to Storefront API from python server

Requests to Storefront API from python server

NavGe
Shopify Partner
1 0 0

I have my own website and customers.

I want to sell my client's products inside my site using StorefrontAPI.

But I need that all the requests to StorefrontAPI will be from my server in python.

I'm trying to use shopify_python_api but I'm struggling with section 3:

 

 

 

 

shop_url = "SHOP_NAME.myshopify.com"
api_version = '2020-10'
state = binascii.b2a_hex(os.urandom(15)).decode("utf-8")
redirect_uri = "http://myapp.com/auth/shopify/callback"
scopes = ['read_products', 'read_orders']

newSession = shopify.Session(shop_url, api_version)
auth_url = newSession.create_permission_url(scopes, redirect_uri, state)
# redirect to auth_url

 

 

 

What do I need to define in my custom app to make it work?

 

Replies 0 (0)