Authorization Type

Carbon utilizes Access Key-based authentication for connecting to GitHub repositories.

Authorization Flow


Step 1: Generate an Access Token

To enable synchronization of repositories with our system, users need to create a GitHub Personal Access Token with appropriate permissions (view screenshot below). Follow the steps outlined in the GitHub documentation on Managing Personal Access Tokens.

Step 2: Post Credentials to Carbon

Once the access token is generated, users should submit their GitHub username and access token to our integration endpoint at /integrations/github or via our Carbon Connect UI. This action initiates the synchronization process by listing their repositories and their respective content within our system.

Users have the flexibility to set an expiry for their access tokens. If a token expires, they can simply generate a new one with the necessary permissions and post it to the same endpoint (/integrations/github). Our system automatically updates the data source with the new token, ensuring uninterrupted synchronization.

Step 3: Sync Github Files

After successfully connecting their GitHub account, users can leverage our API endpoints (/integrations/items/list and /integrations/files/sync) or the pre-built Carbon Connect file picker to effortlessly browse and sync files from their repositories. This streamlined process simplifies content management and ensures seamless collaboration within our platform.


Carbon syncs Github files from all private and public repositories. In cases where an extension is unknown, we’ll attempt to parse it as a text file.


You can also use the resync_file API endpoint to programmatically resync specific Github files. To delete Github files from Carbon, you can use the delete_files endpoint directly.

To sync Github files on a 24-hour schedule (more frequent schedules available upon request), you can use the /update_users endpoint. This endpoint allows organizations to customize syncing settings according to their requirements, with the option to enable syncing for all data sources using the string ‘ALL’. It’s important to note that each request supports up to 100 customer IDs.

Here’s an example illustrating how to automatically enable syncing for updated Github content for specified users:

    "customer_ids": ["", ""],
    "auto_sync_enabled_sources": ["GITHUB"]