Download the PHP package sensei/partner-sdk without Composer
On this page you can find all versions of the php package sensei/partner-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sensei/partner-sdk
More information about sensei/partner-sdk
Files in sensei/partner-sdk
Package partner-sdk
Short Description Official PHP SDK for Sensei Partner API - Complete gamification and user engagement platform
License MIT
Informations about the package partner-sdk
Sensei Partner SDK for PHP
Official PHP SDK for the Sensei Partner API. Build integrations with Sensei's complete gamification and user engagement platform.
Requirements
- PHP 8.1 or higher
- Guzzle HTTP client 7.0+
- Laravel 10+ (optional, for framework integration)
Installation
Authentication: Two Levels
The SDK uses two authentication levels depending on who performs the action:
| Auth Type | When to Use | Resources |
|---|---|---|
| API Key | Partner/admin operations | users.signupAndLink, products, subscriptions, analytics, dashboard |
| User Token | User-owned actions | guilds, alliances, messages, trustScore, userStripeConnect |
Quick Start
Basic Usage (Without Laravel)
Laravel Integration
The SDK includes full Laravel support with auto-discovery.
Configuration
Publish the config file:
Set your credentials in .env:
Using the Facade
Using Dependency Injection
Available Resources
Products
Manage formations, services, and digital products.
Subscriptions
Manage customer subscriptions.
Users/Customers
Manage your customers and students.
Dashboard & Analytics
Access statistics and generate reports.
Payments
Manage payments, refunds, and invoices.
Stripe Connect
Manage your Stripe Connect integration.
Alliances
Alliances are federations of guilds that can cooperate, share treasuries, and compete in wars.
Trust Score
The Trust Score system allows users to build reputation through weighted voting.
User Stripe Connect (Seller Onboarding)
Allow your tenant's users to become sellers and receive payments for services, events, formations, mentoring, etc.
Important: This resource requires a user token (from signupAndLink or loginAndLink), not the partner API key.
SSO / OAuth 2.0
Enable Single Sign-On for seamless authentication between your platform and Sensei Temple. Implements OAuth 2.0 with mandatory PKCE (RFC 7636) for enhanced security.
SSO Security Best Practices
- Always use PKCE - The SDK enforces PKCE with S256 method (mandatory)
- Use state parameter - Protect against CSRF attacks
- Store tokens securely - Never expose tokens in URLs or logs
- Short-lived access tokens - Default 15 min, max 1 hour
- Use HTTPS redirect URIs - Required in production
- Rotate secrets regularly - Use
regenerateSecret()periodically
API Keys
Manage your API keys for integrations.
Webhooks
Configure webhook endpoints.
Compliance (GDPR, Tax)
Handle compliance requirements.
Partner Profile & Settings
Manage your partner profile.
Pagination
The SDK uses cursor-based pagination with a PaginatedResponse helper:
Error Handling
The SDK throws specific exceptions for different error types:
Configuration Options
Or from array:
Testing
For testing, use test mode API keys (sk_test_xxx):
Support
- Documentation: https://docs.senseitemple.com
- API Reference: https://api.senseitemple.com/docs
- Support: [email protected]
License
MIT License - see LICENSE file for details.