TDV Adapter for Trello

Build 22.0.8462

Headless Machines

Using OAuth on a Headless Machine

The following sections show how to authenticate a headless server or another machine on which the adapter cannot open a browser. You can authenticate with a user account.

User Accounts

To authenticate with a user account, you need to authenticate from another machine. Authentication is a two-step process.
  1. Instead of installing the adapter on another machine, you can follow the steps below to obtain the OAuthVerifier value. Or, you can install the adapter on another machine and transfer the OAuth authentication values, after you authenticate through the usual browser-based flow.
You can follow the headless OAuth authentication flow using the OAuth credentials for your custom OAuth app.

Using the Credentials for a Custom OAuth App

Obtain ClientId and ClientSecret

Visit https://trello.com/app-key to obtain the ClientId under Key and ClientSecret under Secret at the bottom of the page.

Obtain an OAuth Verifier

Set the following properties on the headless machine:

  • InitiateOAuth: Set this to OFF.
  • Save the value of the returned AuthToken and AuthKey. They will be used in the next step.
  • Open the returned URL in a browser. Log in and grant permissions to the adapter. You are then redirected to the callback URL, which contains the verifier code.
  • OAuthClientId: Set this to the Client Key obtained.
  • OAuthClientSecret: Set this to the Secret Key obtained.

You can then follow the steps below to authenticate from another machine and obtain the OAuthVerifier connection property.

  1. Call the GetOAuthAuthorizationURL stored procedure.
  2. Open the returned URL in a browser. Log in and grant permissions to the adapter. You are then redirected to the CallbackURL, which contains the oauth verifier.
  3. Save the value of the oauth_verifier query parameter. You will set this in the OAuthVerifier connection property.

On the headless machine, set the following connection properties to obtain the OAuth authentication values:

  • OAuthClientId: Set this to the Client Key obtained.
  • OAuthClientSecret: Set this to the Secret Key obtained.
  • OAuthVerifier: Set this to the oauth verifier.
  • AuthToken: Set this to the AuthToken.
  • AuthKey: Set this to the AuthKey.
  • OAuthSettingsLocation: Set this to persist the encrypted OAuth authentication values to the specified file.
  • InitiateOAuth: Set this to REFRESH.

After the OAuth settings file is generated, set the following properties to connect to data:

  • OAuthClientId: Set this to the Client Key obtained.
  • OAuthClientSecret: Set this to the Secret Key obtained.
  • OAuthSettingsLocation: Set this to the file containing the encrypted OAuth authentication values. Make sure this file gives read and write permissions to the provider.
  • InitiateOAuth: Set this to REFRESH.

Transfer OAuth Settings

Follow the steps below to install the adapter on another machine, authenticate, and then transfer the resulting OAuth values.

On a second machine, install the adapter and connect with the following properties set:

  • OAuthSettingsLocation: Set this to a writable text file.
  • InitiateOAuth: Set this to GETANDREFRESH.
  • OAuthClientId: Set this to the Client Key obtained.
  • OAuthClientSecret: Set this to the Secret Key obtained.
  • CallbackURL: Set this to the endpoint you would like Trello to return information to ex. a localhost callback such as http://localhost:33333.

Test the connection to authenticate. The resulting authentication values are written, encrypted, to the path specified by OAuthSettingsLocation. Once you have successfully tested the connection, copy the OAuth settings file to your headless machine. On the headless machine, set the following connection properties to connect to data:

  • InitiateOAuth: Set this to REFRESH.
  • OAuthClientId: Set this to the Client Key obtained.
  • OAuthClientSecret: Set this to the Secret Key obtained.
  • OAuthSettingsLocation: Set this to the path to your OAuth settings file. Make sure this file gives read and write permissions to the adapter.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462