Protect partner keys
Partner keys authorize project-wide operations. Store them in a server-side secret manager or encrypted environment variable and inject them only into trusted backend processes. Usepk_test_ keys while developing and pk_live_ keys only in production.
Keep test and live projects separate, rotate keys periodically, and revoke a key
immediately if it may have been exposed.
Authorize every customer operation
The SDK authenticates your application, not the customer using your product. Before every SDK call:- Authenticate the customer in your application.
- Resolve the customer’s stored Social media studio
endUserIdon your server. - Verify that requested connection and post IDs belong to that customer.
- Call the SDK using those server-resolved IDs.
endUserId from a browser and pass it through without
checking ownership in your database.
Key scopes
Partner keys can be restricted to the capabilities a service needs:
Use separate, least-privilege keys for independent services where possible.
Handle SDK errors
Every unsuccessful API request throwsSoMePlatformError:
For post creation, retries are safe only when you reuse the same idempotency
key. Do not blindly retry other write operations unless your application can
confirm their outcome.