Skip to main content
You show the list of connectors and collect the credentials inside your own product. You send the credentials to Chift when you create the connection. Your end-user never sees a Chift page.
Fully embedded is the most work for a small gain over the embedded connector-picker, which is the recommended mode. You build and maintain the credential forms of every connector. Choose it only if you must hide every Chift page.

Which connectors support Fully embedded

Some connectors need post-connection values, such as the accounting folder. Their options can only be read once the connection works. Send them in a second call. See Set the post-connection values.

Steps

1

Create the consumer

Create one consumer per end-user. Store the returned consumerid on your end-user record. You reuse it for every connection that end-user makes.
Already have a consumerid for this end-user? Skip this step.
API reference: Create new consumer ↗
2

Fetch the connectors

Show the connectors in your own UI, as in the Embedded connector-picker. Leave out the entries with local_agent set to true: Fully embedded does not support them. Keep the integrationid of the connector your end-user picks.API reference: Get list of integrations ↗
3

Get the credentials of the chosen connector

The response has the credentials to send when you create the connection. Each one has a name, an optional flag and a visibility:
  • consumer: your end-user provides it.
  • connector: you set it when you activate the connector. Do not send it.
  • both: send it, unless you set it when you activated the connector.
4

Collect the credentials

Show a form with the credentials of the chosen connector.
Do not hardcode the credentials of a connector. They can change with new connector releases. Build the form from GET /integrations/{integrationid} each time.
5

Create the connection

Send integrationid, name and credentials. Each credential is a key (the credential name) and a value:
When the connector supports it, Chift tests the credentials before it activates the connection. The call returns a url. Ignore it when the connection is active.API reference: Add new connection ↗
6

Set the post-connection values

Skip this step if the connector has no post-connections.
  1. Read the post-connections of the connector in GET /integrations/{integrationid}. Each item of post_connections has:
    • id: the key to send.
    • optional: false means the value is mandatory.
    • config.enabled: true means the optional post-connection is enabled in your connector settings. Chift ignores an optional value that is not enabled.
    • resource: the route that lists the options.
  2. List the options with GET /consumers/{consumerid}/{resource}. For example, accounting/folders gives GET /consumers/{consumerid}/accounting/folders. Let your end-user pick one.
  3. Update the connection. Send every credential again, plus one credential per post-connection value. The key is the post-connection id. The value is the id of the option. A few connectors use another field of the option: see the connector page.
When you send post-connection values, send all the mandatory ones. Otherwise the call fails with ERROR_CONNECTION_POSTCONNECTION_MISSING (HTTP 400). You can also send the values when you create the connection, if you already know them.
Chift activates the connection even when a mandatory post-connection value is missing. The calls that need the value then fail. Set the mandatory values before you call the Unified API.
The connection returns the stored values in data. See the next step.API reference: Update an existing connection ↗
7

Check the connection

Reload the consumer’s connections. Find the connection by its integrationid: a consumer has only one connection per connector. Confirm its status is active. Then you can call the Unified API for that consumer.
Store the connectionid of that connection. To check it again later, get it directly:
API reference: Get connections ↗

Update the credentials

Use Update an existing connection with the new credentials. Chift tests them again. An update replaces all the credentials of the connection, so send every credential again.

OAuth2 connectors: pre-OAuth2

With pre-OAuth2, you run the OAuth2 flow of the connector’s software yourself. Then you create the connection with the tokens in credentials: Add the other credentials of the connector, if it has any.
Chift sets up pre-OAuth2 with you. Contact us to enable it for your account and connectors.
Without pre-OAuth2, an OAuth2 connector needs the Chift connector page: use the embedded connector-picker.