All Collections
Apideck Unify
How to handle multiple connections for one connector
How to handle multiple connections for one connector
Updated over a week ago

Sometimes, our customers want to allow their customers to link multiple connections of the same type by, for example, linking multiple Salesforce accounts per consumer.

At the moment, one consumer can only link to one connection of the same connector as visualized below:

A possible workaround would be to have multiple consumer IDs per user because connections are scoped to consumers.

To facilitate the use of multiple consumer IDs per user, it is necessary to link a user on your platform to two (or more) consumer IDs, as connections are specific to consumers.

When initiating a vault session, ensure that you transmit the unique consumers associated with the user. Consequently, the user object in your system would be structured as follows:

ID: 123 
UserName: Joe Doe
ApideckConsumerIds: [123-salesforce-1, 123-salesforce-2]

When you wish to incorporate multiple connections for the same consumer, consider indexing them during the initiation of a new connection.

For instance, if your internal user IDs follow the pattern test_user_id, you can include an index when sending them.
Example Consumer ID: test_user_id:0 or 123-salesforce-1

Is it possible to limit the number of connections per API per consumer?

It is currently not possible to limit the amount of connections in Vault. You could build some logic using the Vault API to decide if a consumer is allowed to open Vault if they already have enabled connections.

Learn more about it in our get-started guide.

Did this answer your question?