Adding Integrations

Steps

You'll need:

  • an access token
  • a SideDrawer Account

1. Get your existing Integrations

Check what Integrations you already have.

GET /api/v1/developers/tenant/tenant-id/{tenantId}/integrations

Here, there is an existing DocuSign Integration that we have called "Sign".

[
    {
        "integrationType": "docusign",
        "name": "Sign",
        "siteName": null,
        "adminAccountEmail": null,
        "tenant": "{tenantId}",
        "cobrandId": "{cobrandId}",
        "state": "{}",
        "accessToken": "{}",
        "id": "{}"
    }
]

2. Add a new Integration

POST /api/v1/developers/tenant/tenant-id/{tenantId}/integrations

In this example, we're trying to add a OneDrive Integration. So in the request body, the integrationType is onedrive.

{
    "integrationType": "onedrive",
    "name": "My OneDrive Integration",
    "callbackURL": null,
    "clientId": null,
    "clientSecret": null,
    "tenantId": null
}
{
    "integrationType": "onedrive",
    "name": "My OneDrive Integration",
    "clientId": null,
    "clientSecret": null,
    "tenantId": null,
    "_id": "{}",
    "tenant": "{tenantId}",
    "cobrandId": "{cobrandId}",
    "__v": 0
}


3. Recheck your existing Integrations

Now you should be able to see the new Integration you just added.

GET /api/v1/developers/tenant/tenant-id/{tenantId}/integrations

The response body now shows both the DocuSign Integration and the added OneDrive Integration.

[
    {
        "integrationType": "docusign",
        "name": "Sign",
        "siteName": null,
        "adminAccountEmail": null,
        "tenant": "{tenantId}",
        "cobrandId": "{cobrandId}",
        "state": "{}",
        "accessToken": "{}",
        "id": "{}"
    },
    {
        "integrationType": "onedrive",
        "name": "My OneDrive Integration",
        "clientId": null,
        "clientSecret": null,
        "tenantId": null,
        "tenant": "{tenantId}",
        "cobrandId": "{cobrandId}",
        "id": "{}"
    }
]


4. Configure your new Integration

GET /api/v1/developers/integrations/provider/{provider}/consent?tenantId={tenantId}&integrationId={integrationId}

ex. {provider} is onedrive

{
    "consentUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/..."
}