Documentation Index
Fetch the complete documentation index at: https://docs.appnigma.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Every Salesforce account that your user connects through Appnigma Integrations is stored as a Connection — an encrypted record linking a user’s Salesforce org to one of your integrations. This guide shows you how to manage those connections end-to-end using your credentials. You get two credentials when you create an integration:API Key
Server-side only. Used to list connections, read their credentials,
and make proxied Salesforce API calls. Never expose this in a browser.
Public Key
Frontend-safe. Used only to initiate the OAuth flow from a browser.
Cannot read data or call APIs on its own.
All examples below use the official
@appnigma/integrations-client
Node SDK and the appnigma-integrations-client
Python SDK.Install the SDK
The Python SDK is async — all methods must be called with
await inside
an async function. Use async with AppnigmaClient(...) as client: for
automatic session cleanup.1. Initiate a connection (public key)
This is the only step that uses your public key, and it happens in the browser. Redirect your user to the connect URL and AP-Integrations handles the entire OAuth handshake with Salesforce.Connect URL format
https://integrations.appnigma.ai/connect/{integrationId}?public_key={publicKey}
The ID of the integration you created via the admin API.
Your frontend-safe public key. Safe to include in client-side code.
Example: backend route that builds the URL
Example: frontend button
redirect_uri with a
connection_id you should persist against your internal user record.
2. List connections (API key)
Fetch every connection tied to your integration. Useful for building an admin dashboard or letting users pick which org to query.Query parameters
Filter by status:
connected, expired, revoked, deleted.production or sandbox.Case-insensitive substring match against
userEmail.Max connections to return per page.
Pagination cursor from the previous response’s
nextCursor.Response
Array of connection summaries. Encrypted tokens are never included here.
Number of connections in this page.
Opaque cursor for the next page. Omitted when there are no more results.
3. Inspect a single connection’s credentials (API key)
Retrieve a live, decrypted access token for a specific connection. The token is refreshed automatically if it’s within 5 minutes of expiring.When to use this
- You need to call a Salesforce endpoint that isn’t supported by the proxy
- You’re embedding a Salesforce SDK that expects a raw access token
- You’re building a background worker that holds a token for a short burst of operations
4. Make proxied Salesforce API calls (API key)
The proxy is the easiest way to talk to Salesforce. You never see the token — you just describe the request you want to make.Request body
HTTP method:
GET, POST, PUT, PATCH, or DELETE.Salesforce API path, e.g.
/services/data/v59.0/query. Do not include
the instance URL.Query string parameters (merged into the final URL).
JSON body for
POST/PUT/PATCH requests.What the proxy does for you
- Validates your API key and looks up the connection
- Refreshes the token automatically if it’s close to expiring
- Forwards your request to the correct Salesforce instance URL
- Tracks the call against your plan’s usage quota
- Returns the raw Salesforce response
Example: create an Opportunity
End-to-end example
Here’s a complete minimal backend that implements the user journey: user connects Salesforce → your app queries their pipeline → user can disconnect.Error handling
All SDK methods throw errors with astatus property matching the HTTP
status code returned by AP-Integrations.
Common error codes
| Status | Meaning | What to do |
|---|---|---|
400 | Missing required field | Check your request body |
401 | Invalid API key or expired connection | Prompt user to reconnect |
403 | API key doesn’t match the integration | Verify key/integration pairing |
404 | Connection not found | Prompt user to connect |
429 | Plan limit exceeded | Upgrade plan or wait for next month |
Next steps
Node SDK
Node.js source code, issues, and changelog
Python SDK
Python source code, issues, and changelog