I have a custom app that I wrote for our existing stores. We are developing a new store and the custom app can't connect to the store. I have checked the api key, secret and token to ensure they are correct. Using postman I get a 401 error if I just use key + secret. If I add the token to the header I get a 403 error.
The documentation that you have for shopify_python_api borders on non-existent and what is there is actually inaccurate. After digging through the source code on github I managed to piece together a solution.
I had to use shopify.ShopifyResource.set_headers to add the X-Shopify-Access-Token before I could use shopify.ShopifyResource.set_site(shop_url) to connect to the store. You would think, given that this is a vital step in the process, that would be mentioned somewhere