Getting Token for Python

New Member
8 0 0

Hi all,



Novice coder here, trying to build a private app for my back end using some python scripting.

What I've done so far:

I'm following the steps in , laying out the code in the "Getting Started" section.


I understand the code in 1,2,5,6,7 but don't really understand what 3-4 are referring to. How can I get these access tokens? I understand it has something to do with OAuth.


I watched this video: and it seems to use ngrok and Flask.



Correct my understanding - once I get the "code", then I can just copy the string in or put it in a config file? Is this what the token is?

How are steps 3-4 to be coded in python?

Can I achieve steps 3-4 without the use of Flask or ngrok? I'm looking to build a simple script without any additional software, if possible.



Appreciate the help. Development is not my main cup of tea, but I do get my feet wet occasionally.

Once I get past the authentication, I should be good!



Shopify Staff
Shopify Staff
240 32 37

Hey @DL7,


For a private app, you can skip steps 3, 4 & 5:


For a private App you just need to set the base site url as follows:

shop_url = "" % (API_KEY, PASSWORD, API_VERSION)

That's it you're done, skip to step 6 and start using the API!