Get orders from my shop using shopify api without app

Hi everyone!

I have multiple shops and try to create a simple script to export all orders to db. Is there any way to use shopify API without creating app in my account?

The workflow described here doesn’t work for me as I don’t want to install any app in my account and also I don’t have any server to fill in ‘App URL’ and ‘Allowed redirection URL(s)’ when creating my app. https://shopify.dev/tutorials/authenticate-with-oauth

Is there any option to generate some kind of access key in my account and use it to make requests to api? Thanks!

I think you should try private apps?

Even you don’t have any server, you can use ngrok to create a link between Shopify and your computer

Private apps can no longer be created since Jan 2022. I’m ok to create a custom App and installing it in my clients store, purely for for purpose of getting the API_Key and secret_key ( as I’m not sure there’s any other way to get them ), but then I need to generate a dynamic token, rather than creating a static one via the App and inserting it in the code.

I’ve tried the following Python code which works when I use the static token, but don’t know what is missing in my code ( other than defining request_params ) to get the dynamic access token. See the code line in bold

shopify.Session.setup(api_key=API_KEY1, secret=API_SECRET_KEY1) #switching to the API Key and SEcret Key combination required for Custom APPs

state = binascii.b2a_hex(os.urandom(15)).decode(“utf-8”)
redirect_uri = “http://myapp.com/auth/shopify/callback
scopes = [‘write_products’]

newSession = shopify.Session(shop_url1, API_VERSION1)
auth_url = newSession.create_permission_url(scopes, redirect_uri, state)

redirect to auth_url

session = shopify.Session(shop_url1, API_VERSION1)
access_token = session.request_token(request_params) # request_token will validate hmac and timing attacks

you should save the access token now for future use.

session = shopify.Session(shop_url1, API_VERSION1, access_token)
shopify.ShopifyResource.activate_session(session)
shop = shopify.Shop.current() # Get the current shop

Can someone please guide me