Hello. I have a business account that I use for my business. I want to retrieve things like customers, orders, invoices, etc. using the python sdk. My question is that in order to use the SDK, I need to generate a SQUARE_ACCESS_TOKEN from a developer account. If I sign in to the developer account using the same credentials as my business account, can I access my business account data or will it create an empty account?
Any suggestions are appreciated.
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Square Python SDK Quickstart
Python SDK
Access Tokens and Other Credentials
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
Yes, you can access your business account data using the Square Python SDK. When you sign in to the developer account using the same credentials as your business account, it does not create an empty account. Instead, it allows you to access the data associated with your business account.
You can generate a personal access token from the Developer Dashboard of your Square account. This token grants full access to all the resources in your Square account, including customers, orders, invoices, etc.
Remember to instantiate a Client object with the appropriate environment (production or sandbox) and the access token. Then, you can make API calls to retrieve the data you need.
Please note that it’s strongly recommended not to hardcode your personal access token in your code. Instead, consider storing it securely in an environment variable or a secret management system.
This answer was reviewed by @Bryan-Square.