SourCherry Help Centre
Home â€ș App marketplace â€ș Get Started w/ App Marketplace

API Center of Excellence | Python and PHP SDKs

Ship integrations faster—no more hand-rolling OAuth flows. The new SourCherry PHP and Python SDKs drop into your stack, handle all token work automatically, and expose every public API with type-safe helpers.


TABLE OF CONTENTS


What is the SourCherry PHP & Python SDK?


SourCherry’s officially supported SourCherry/api-client (PHP) and SourCherry-api-client (Python) libraries wrap the entire v2 Public API. Each SDK automates OAuth 2.0 token exchange, rotation, uninstall cleanup, and even marketplace bulk-installs—letting you focus on features instead of authentication plumbing.



Key Benefits of SourCherry SDKs



Supported OAuth 2.0 Workflows


A flexible token engine covers every installation path developers meet.



Database-Agnostic Token Storage


Pluggable storage adapters keep tokens safe wherever you already persist data. Swap in:



SDK Auto-Generation


Both clients rebuild automatically from the OpenAPI spec each time SourCherry releases new endpoints or fields, so you can update with a simple composer update or pip install --upgrade. 


The SDK aims to abstract the complexity of implementing OAuth 2.0 away from developers, fully managing tokens for them across all scenarios.


Resources


1. SDK OVERVIEW

2. PYTHON:

3. PHP:


Frequently Asked Questions


Q: Do I still need to refresh tokens manually?

No. Once session storage is configured, the SDK refreshes tokens silently before they expire.



Q: Can I store tokens in MySQL instead of MongoDB?

Yes. Extend the provided storage base class with your own create/read/update logic.



Q: Does the SDK support Private Integration Tokens (PIT)?

Absolutely—pass privateIntegrationToken when you don’t need OAuth flows.



Q: How do I validate webhook signatures?

Use client.webhooks.subscribe() in Python or getWebhookManager()->verifySignature() in PHP.



Q: Is the SDK compatible with SourCherry’s v1 endpoints?

No. The SDK targets Public API v2 only.



Q: Will updates break my code?

New releases are semver-tagged; breaking changes trigger a major version bump so you can pin and upgrade deliberately.