This project demonstrates how to integrate and use the DecodL API for downloading various types of digital assets, including images and videos from popular stock providers. DecodL simplifies the process of acquiring licensed content for your projects by providing a unified API for multiple stock asset platforms.
The DecodL API Download Demo is a simple web application that showcases how to interact with the DecodL API. It allows users to:
- Select a content provider (e.g., Shutterstock, Adobe Stock, Freepik)
- Enter an asset code or link
- Initiate a download request
- Monitor the download progress
- Retrieve the final download link
This demo serves as a starting point for developers looking to integrate DecodL's services into their own applications.
- User-friendly interface for initiating downloads
- Real-time progress updates
- Support for multiple stock content providers
- Error handling and display
- Responsive design using Tailwind CSS
Before you begin, ensure you have the following installed:
- PHP 7.4 or higher
- Composer
- Web server (e.g., Apache, Nginx), or you can use the built-in php (
php -S localhost:8080
) - Git (for cloning the repository)
-
Clone the repository:
git clone https://github.com/yourusername/decodl-api-demo.git cd decodl-api-demo
-
Install PHP dependencies:
composer install
-
Copy the
.env.sample
file to.env
:cp .env.sample .env
-
Open the
.env
file and add your DecodL API credentials:APP_KEY=your-app-key AUTH_TOKEN=your-auth-token
You can obtain these credentials by signing up at DecodL.
-
Configure your web server to serve the project directory.
- Open the application in your web browser.
- Select a provider from the dropdown menu.
- Enter the asset code or link in the input field.
- Click the "Download" button to initiate the process.
- Wait for the download to complete and click the provided link to access your asset.
The application uses environment variables for configuration. You can modify the following in your .env
file:
APP_KEY
: Your DecodL API keyAUTH_TOKEN
: Your DecodL authentication token
For more advanced configuration options, you can modify the api-proxy.php
file.
If you encounter any issues:
- Check that your
.env
file is correctly configured with valid API credentials. - Ensure that your web server has write permissions for the project directory.
- Check the PHP error logs for any specific error messages.
- Verify that you're using a supported PHP version (7.4+).
If problems persist, please open an issue on the GitHub repository.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
For more information about DecodL and its services, visit https://decodl.net/.