Fiber
Docs
Search docs
Ctrl K
Accounts & Credentials
Learn how to configure which third-party accounts to pull data from.

Overview

Accounts hold credentials to load your users' data from third-party apps. These credentials vary depending on the source type, but often include access tokens or account IDs.

Accounts are always associated with a particular Source in your environment. This gives you more control over which accounts are synced with which destinations. Also, third-party credentials are often tied to a particular developer identity (eg. a client ID and secret), which you provide as part of the source configuration.

Example: If you're using Fiber to pull data from Stripe, the a source with type "Stripe" must be configured with a "API secret key", and each account tied to this source will require a simple "Stripe Account ID" (instead of more elaborate credentials). Without the source's secret key, the individual account credentials mean nothing.

Creating Accounts

There are two ways to create accounts in Fiber: on the dashboard, or using the API. The API method is most common — you will likely want to create accounts programmatically as users sign up for your app.

  • Dashboard

  • API

Follow these steps to create an account via the dashboard:

  1. Go to the Sources tab on the dashboard.
  2. Click on the source you want to add an account for.
  3. Go to the Accounts tab.
  4. Click the Add account button.
  5. Enter the account's credentials. These fields will vary depending on the source type.
  6. Click Save.

Credential verification

Fiber does its best to verify that the credentials you provide are valid, but that isn't always possible. When credentials are invalid, Fiber may refuse to create the account. This is true in both dashboard and API methods.

Refer to the API reference to learn what errors to expect.

Managing accounts

Use the Fiber dashboard to manage the accounts in your environment. Accounts are listed under the Accounts tab of each source page.

There you can see the account's external ID, metadata, and state. You can also create, edit, and delete accounts.

External IDs

Accounts within a source are uniquely identified by an external ID, a value set by Fiber with meaning that varies from source to source.

For Shopify accounts, Fiber sets the external_id to the Shopify store's Shop ID. For GitHub accounts, the external_id is the Installation ID of the GitHub app. This value is provided by the developer as part of the Github account credential, but verified to correspond to an actual installation ID by Fiber by querying the GitHub API.

To learn what values are used for external ID for each source type, refer to the source catalog.

The Fiber API returns the external ID when you register a new account, and uses it to identify accounts for other API endpoints. You should store this ID in your database, associated with the user or team who owns the third-party account.

Verfication Exceptions

The uniqueness of external IDs helps prevent nasty API rate limit issues. For that reason, Fiber tries to obtain the external ID from the third-party API by querying it with the credentials you provide. However, this isn't always possible.

For a small number of sources, such as Amazon Selling Partner, Fiber may not be able to read a unique account identifier from the third-party API. In those cases, Fiber may automatically assign a particular field from the credential object as the external ID, without being able to verify that it is unique. Those sources may contain duplicate accounts pulling the same data without warning, so be careful.

Account States

At any time, an account can be either active or disabled. By default, syncs will pull data from all active accounts tied to that portal's source. Disabled accounts will stop being pulled from.

Accounts can be disabled by Fiber or by you.

Over time, Fiber may disable accounts that it can no longer pull data from. Credentials may expire or be revoked (eg. if a user uninstalls your app) in ways that Fiber can't automatically correct. When that happens, Fiber may deactivate the particular account.

Toggling an account state

You can toggle account states via the dashboard or the API.

We are rolling out this feature gradually. Please reach out to our team to get access to this.

Account Custody

A small number of sources call for extra coordination when it comes to refreshing third-party credentials. This is sometimes the case with OAuth APIs that implement refresh tokens, such as Quickbooks. These APIs only allow a single access token to be active for a given set of credentials at a time. This becomes a problem when both Fiber and your backend expect to be able to obtain a new access token for a particular credential.

To prevent this, Fiber takes "custody" of the refresh token for accounts where it is necessary, and offers an API for you to query for fresh access tokens when you need them. Whenever you want, you can free the refresh token and regain custody of the account. When that happens, Fiber will disable the account and stop pulling data from it.

Our API endpoints for querying for access tokens are currently in beta. If you would like to use them, please reach out to our team.
Copyright © 2024 Fiber