Installation
- Node.js
- Python
Basic Connection
- Node.js
- Python
Authentication vs Event Targeting
App Key authenticates your connection, while Client ID (appId) targets event delivery:- App Key: Authenticates who you are when connecting to EnSync
- Client ID: Identifies the recipient when publishing events (this is your appId)
Events are always published to specific Client IDs. Even if multiple partners subscribe to the same event type, they only receive events explicitly addressed to their Client ID.
Connection Options
- Node.js
- Python
Closing Connections
Always close connections when done to free resources:- Node.js
- Python
Best Practices
- Store credentials in environment variables, never hardcode them
- Use secure TLS connections in production (
grpcs://orwss://) - Close connections when done to free resources