OAuth Connector (Custom OAuth 2.0)

Go to Product

Authenticate at arbitrary OAuth 2.0 (RFC5849) APIs using the “Authorization Code” flow. The target group of this node are intermediate users with an understanding of OAuth fundamentals and developers. From a high-level perspective, this works as follows:

  1. Register an “application” at the service with which you want to authenticate (the steps for this depend on the actual service – have a look at the developer API documentation). If you’re asked for a “Callback URL”, enter “http://localhost:55931” (or if you want to use a different port than the default, just update the node configuration accordingly). After completing this step, you should get a personal “API Key” and “API Secret” (the exact terminology might vary).
  2. Open the configuration of this node, and enter the API Key and Secret which you received in the previous step into the corresponding fields. Also configure the URL inputs according to the service’s instructions.
  3. Click the Authorize button. A browser window will open and (unless you’re already logged into the service) ask for login credentials and permission to access the service. Once you have authenticated successfully, you will see an “Access granted” page in your browser which you can close and go back to KNIME.
  4. The dialog will show “Successfully received an access token”. Close the dialog and execute the node. The table which is created on node execution will contain the access token (and probably other information such as a refresh token, scope, and expiration info). For your convenience, this information is also available as Flow Variables. If the service also returned a refresh token, the node will request a new access token when it is re-executed.
  5. Use the obtained access token and supply it to your nodes which access the REST API – we strongly recommend the rock-solid, battle-proof HTTP Retriever from Palladian. But other nodes, such as KNIME’s integrated REST client also work. Usually the token will be provided in an “Authorization” header, but this depends on the actual service – please refer to the documentation of the API you’re trying to access.

Note: This node is a discretionary add-on to the existing “OAuth Connector” node which includes 50+ predefined, ready-to-use services. For more details please get in touch at mail@palladian.ai

Options

API Key
(aka. “Client ID”) The API Key from the API you’re accessing.
API Secret
(aka. “Client Secret”) The API Secret from the API you’re accessing.
Authorization URL
The URL of the web page of the service which requests the user’s authorization.
Token URL
The API URL which is used for requesting a token.
Refresh URL (*)
The API URL which is used for refreshing a token. (leave empty to use the “Token URL”)
Callback URL Port
The port on which the local web server will be listening, e.g. http://localhost:12345.
Scope (*)
Optionally specify a scope.
Authorize Access
Click to open browser and start authorization.
Clear Token
Clears the token and allows you to re-authorize.

Input Ports

This node has no input ports

Output Ports

Icon
Result of the authentication which includes the following columns:
  • accessToken: The access token issued during authorization
  • refreshToken): The refresh token, which can be used to obtain new access tokens (see here)
  • scope: The scope, which can be different from the one requested
  • tokenType: The type of the token (see here)
  • expiresIn: The lifetime of the access token in seconds
  • expiredAt: The date/time when the access token will expire
  • rawResponse: The raw response string for the authentication request (this can be JSON or other formats)

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

  • No workflows found

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.