Creating an OAuth for your custom or Flex connector
Some of your custom connectors and Flex connectors will require authentication before you can use them. There are two authentication types: - Using OAuth 2.0 client credentials and an API access token. - Using Auth Code OAuth
In both cases, you will create an OAuth connection, then reference this connection when using your custom connector in your data pipelines in Designer.
Note
Currently, you need to pass your client ID and client secret twice during this flow. Once when creating your OAuth in Custom Connector, and again when creating your OAuth in your Designer project. We are working hard to improve this user experience.
Warning
In relation to the above note, if you make any changes to your OAuth connections in Custom Connector, you must recreate your OAuth connection in the OAuth tab of your Designer project. OAuth connection profile changes do not carry over from Custom Connector to Designer.
Creating a client credentials OAuth
Prerequisites
- You'll need a custom connector.
- You'll need your client credentials (normally a client ID and a client secret). These are usually generated when creating an application in the developer portal of the service you're connecting to (Facebook, Salesforce, Shopify, and so on).
- You'll need the access token URL, which is used to send an API access token POST request. You can usually find this URL in the API documentation of the service you're connecting to.
Create a client credentials OAuth in Custom Connector
To create a client credentials OAuth connection, follow these steps:
- Log in to the Matillion Hub.
- Click ☰ → Manage → Custom Connectors.
- Click OAuths.
- Click Add OAuth and complete the following fields:
- Name: Give your OAuth connection a unique name so you can find and reuse it later.
- Grant Type: Set this as Client Credentials.
- Client ID: Add your client ID.
- Client Secret: Add your client secret.
- Access Token URL: The URL to send an API access token POST request to. You can usually find this URL in the API documentation of the service you're connecting to.
- Token Parameters: Specify any additional query, header, or body parameters in your API access token request. Click + Add parameters to add a new row in the corresponding tab. The documentation for the service you're connecting to should specify any additional access token request parameters to include.
- Click Authorize. On success, you will be returned to the OAuths page.
Set up your client credentials OAuth connection in Designer
In this section, you'll add your custom connector to the Designer pipeline canvas and create an OAuth connection in your project.
- Click ☰ → Designer.
- Choose your project and your branch.
- Open an existing orchestration pipeline or create a new one.
- Add your custom connector to the pipeline canvas.
- Select the data source you want to load.
- In the Authentication Type property, choose OAuth 2.0 Client Credentials.
- In the next property, Authentication, click Manage. A new browser tab will open at the OAuth tab of your project.
-
Click Add OAuth connection and complete the following fields:
- OAuth name: Give your OAuth connection a unique name so you can find and reuse it later.
-
Provider: Select the service you're connecting to.
Note
This service you're connecting to won't be available in this drop-down menu until you've created the OAuth connection in Custom Connector.
-
Authentication type: Click OAuth 2.0 client credentials.
- Client ID: Add your client ID.
-
Client Secret: Add your client secret.
Note
Applicable only to Flex connectors. Any extra parameters required by your selected Flex connector will also be provided here. These parameters will differ based on the specific Flex connector you authenticate to.
-
Click Authorize. On success, you will be returned to the OAuths tab of your project. Close this tab.
- In Designer, close and reopen the Authentication property and select your new OAuth connection from the drop-down menu.
- Configure the rest of your custom connector.
Creating an auth code OAuth
Prerequisites
- You'll need a custom connector.
- You'll need your client credentials (normally a client ID and a client secret). These are usually generated when creating an application in the developer portal of the service you're connecting to (Facebook, Salesforce, Shopify, and so on).
- You'll need the authorization URL and access token URL, which are used to authorize with the service and to send an API access token POST request. You can usually find these URLs in the API documentation of the service you're connecting to.
Create an auth code OAuth in Custom Connector
To create a client credentials OAuth connection, follow these steps:
- Log in to the Matillion Hub.
- Click ☰ → Manage → Custom Connectors.
- Click OAuths.
- Click Add OAuth and complete the following fields:
- Name: Give your OAuth connection a unique name so you can find and reuse it later.
- Grant Type: Set this as Authorization code.
- Redirect URL: You will need this URL when setting up your OAuth app in the service you’re connecting to.
- Client ID: Add your client ID.
- Client Secret: Add your client secret.
- Authorization URL: The URL to which the browser will be directed to authorize the OAuth app to act on your behalf. You can usually find this URL in the API documentation of the service you're connecting to.
- Access Token URL: The URL to send an API access token POST request to. You can usually find this URL in the API documentation of the service you're connecting to.
- Token Parameters: Specify any additional query, header, or body parameters in your API access token request. Click + Add parameters to add a new row in the corresponding tab. The documentation for the service you're connecting to should specify any additional access token request parameters to include.
- Click Authorize. This will redirect you to a login page for your third-party service, where you will be asked to confirm the connection between Custom Connector and the third-party service. If the authorization is successful, you will be returned to the OAuths page.
Set up your auth code OAuth connection in Designer
In this section, you'll add your custom connector to the Designer pipeline canvas and create an OAuth connection in your project.
- Click ☰ → Designer.
- Choose your project and your branch.
- Open an existing orchestration pipeline or create a new one.
- Add your custom connector to the pipeline canvas.
- Select the data source you want to load.
- In the Authentication Type property, choose OAuth 2.0 Authorization Code.
- In the next property, Authentication, click Manage. A new browser tab will open at the OAuth tab of your project.
-
Click Add OAuth connection and complete the following fields:
- OAuth name: Give your OAuth connection a unique name so you can find and reuse it later.
-
Provider: Select the service you're connecting to.
Note
This service you're connecting to won't be available in this drop-down menu until you've created the OAuth connection in Custom Connector.
-
Authentication type: Click OAuth 2.0 Authorization Code Grant.
- Redirect URL: You will now need to add this URL to your existing OAuth app (or create a new OAuth app) in the service you’re connecting to.
- Client ID: Add your client ID.
- Client Secret: Add your client secret.
-
Click Authorize. This will redirect you to a login page for your third-party service, where you will be asked to confirm the connection between Designer and the third-party service. If the authorization is successful, you will be returned to the OAuths tab of your project.
- Close the current tab.
- In Designer, close and reopen the Authentication property for your custom connector, then select your new OAuth connection from the drop-down menu.
- Configure the rest of your custom connector.