Download the PHP package villaflor/taboola-sdk without Composer
On this page you can find all versions of the php package villaflor/taboola-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download villaflor/taboola-sdk
More information about villaflor/taboola-sdk
Files in villaflor/taboola-sdk
Package taboola-sdk
Short Description This package contains the open source PHP SDK that allows you to access the Taboola Platform from your PHP application.
License MIT
Homepage https://github.com/villaflor/taboola-sdk
Informations about the package taboola-sdk
Taboola SDK for PHP
This package provides a modern, type-safe PHP SDK for the Taboola Platform API with comprehensive endpoint coverage.
Features
- ✅ Complete API Coverage: All major Taboola API endpoints
- ✅ Type-Safe: Immutable DTOs with strict types
- ✅ SOLID Principles: Clean, maintainable architecture
- ✅ Modern PHP: PHP 8.3+ with latest features
- ✅ Production-Ready Examples: 7 comprehensive usage examples
- ✅ Well Documented: Extensive PHPDoc and guides
- ✅ Error Handling: Custom exceptions with context
- ✅ Testing Ready: Complete fixture system for testing
- ✅ 100% Test Coverage: Fully tested with realistic fixtures
Available Endpoints
Authentication
- Get access token (OAuth 2.0)
Account Management
- Get account details
- Get advertiser accounts in network
- Get allowed accounts
Campaigns
- Get all campaigns
- Get single campaign
- Create campaign
- Update campaign
- Delete campaign
- Duplicate campaign
- Bulk update campaigns
Campaign Items (Ads)
- Get all items
- Get single item
- Create item
- Update item
- Delete item
- Bulk create items
- Bulk update items
- Bulk delete items
Reporting
- Campaign summary report
- Top campaign content report
- Realtime campaign report
- Realtime ads report
Images
- Upload image to account
- Get media library taxonomies
- Get images from media library
- Upload to media library
Targeting
- Get available publishers
- Get blocked publishers
- Update blocked publishers
- Get postal code targeting
- Update postal code targeting
- Get marketplace audience targeting
- Update marketplace audience targeting
- Get contextual targeting
- Update contextual targeting
Audiences
- Get custom audiences
- Create custom audience
- Get marketplace audiences
- Get lookalike audiences
- Create lookalike audience
- Get contextual segments
Conversion Tracking
- Get all conversion rules
- Get single conversion rule
- Create conversion rule
- Update conversion rule
Dictionary/Reference
- Get countries
- Get regions by country
- Get cities by country
- Get postal codes
- Get platforms
- Get operating systems
- Get browsers
Requirements
- PHP 8.3 or higher
- Taboola API credentials (Client ID, Client Secret, Account ID)
Note: Request your
client_idandclient_secretfrom your Taboola Account Manager. Youraccount_id, as well as your client credentials, are provided during the API onboarding process.
Installation
You can install the package via composer:
Quick Start
Check out the examples/ directory for production-ready code samples:
- Authentication - OAuth 2.0 token flow
- Campaign Management - Complete CRUD operations
- Bulk Operations - High-performance batch updates
- Reporting - Analytics and data export
- Targeting Setup - Advanced targeting configuration
- Image Upload - Media library management
- Audience Creation - Custom audience targeting
See the Examples README for detailed documentation on running and using these examples.
Usage
Authentication
First, authenticate with the Taboola API to obtain an access token:
Working with Accounts
Managing Campaigns
Generating Reports
Error Handling
The SDK uses type-safe exceptions for better error handling:
Testing
The SDK includes a comprehensive test suite with 100% code coverage and realistic API response fixtures.
Run Tests
Generate Coverage Report
Run Static Analysis
Format Code
Testing with Fixtures
The SDK includes 47 realistic API response fixtures based on official Taboola documentation. You can use these in your own tests:
See the Fixtures README for complete documentation.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Mark Anthony Villaflor
- All Contributors
License
The MIT License (MIT). Please see License File for more information.