Skip to content

Latest commit

 

History

History
93 lines (74 loc) · 4.27 KB

README.md

File metadata and controls

93 lines (74 loc) · 4.27 KB

Edit in Eraser

A Python-based integration for the Alibaba Open API, providing authentication, token management, and product listing functionalities.

RequirementsUsageScriptsDisclaimerDiagrams


📋 Requirements

To run this project, you need:

  • Python 3.7+
  • pip (Python package installer)

Required Python packages:

anyio==4.4.0
argon2-cffi==23.1.0
requests==2.32.3
python-dotenv==1.0.1

A full list of dependencies can be found in the requirements.txt file.

🚀 Usage

  1. Clone the repository:

    git clone https://github.com/ronknight/alibaba-open-api.git
    cd alibaba-open-api
    
  2. Install the required packages:

    pip install -r requirements.txt
    
  3. Set up your .env file with the necessary credentials:

    APP_KEY=your_app_key
    APP_SECRET=your_app_secret
    REDIRECT_URI=your_redirect_uri
    
  4. Run the scripts in the following order:

    python 1initiate.py
    python 2createtoken.py
    python 3refreshtoken.py
    python productlist.py
    

📜 Scripts

  1. 1initiate.py: Initiates the OAuth process and obtains the authorization code.
  2. 2createtoken.py: Creates access and refresh tokens using the authorization code.
  3. 3refreshtoken.py: Refreshes the access token using the refresh token.
  4. productlist.py: Retrieves the product list using the access token.

Each script performs a specific function in the API integration process, from authentication to data retrieval.

⚠️ Disclaimer

This project is for educational purposes only. Ensure you comply with Alibaba's API usage terms and conditions.

📊 Diagrams