Links

API Authentication

Learn how to add API Authentication in UI Bakery
In case your API requires authentication with a certain set of headers or other query params, you can configure and add your HTTP API as a data source, so that you do not need to configure these parameters with every request. Also note that parameters configured in the datasource will be merged with the parameters configured in the specific request.

Datasource Configuration

To configure the data source, navigate UI Bakery, select Data Sources - Connect - choose HTTP API.
You can add any standard type of authentication in UI Bakery:
  • OAuth 2.0;
  • Basic Auth;
  • Custom header or query param.

OAuth 2.0

OAuth 2.0 is a protocol that allows UI Bakery to access data sources hosted by other web apps on behalf of a user.
To set up OAuth 2.0 for datasource, choose the OAuth2 under Authentication Settings.
OAuth 2.0 settings

OAuth 2.0 configuration

  • UI Bakery redirect callback field is readonly, it should be set in API OAuth settings.
  • Client ID and Client Secret should be filled with values provided by API.
  • Authorization URL and Access Token URL should be filled with values provided by API.
  • Scope is space-delimited list of permissions granted to data source.
When Require personal token is enabled, each user will be asked to authorise access to API. Each user will have their own token. Data sources with personal tokens can't be used in public apps by anonymous users or in automations. If personal token is off, then the token acquired during a data source creation will be used by all users.
Prompting user to give access for data source

How to use request data with OAuth 2.0

Authorization: Bearer OAUTH2_TOKEN header will be automatically added to each request to the data source with OAuth 2.0 enabled.

Token Refresh

UI Bakery will try to automatically refresh token if refresh token is returned by API during authorization. If token refresh is not possible, the users will be asked to give access each time the token is expired.

Basic Authentication

To add Basic Authentication, choose the Basic Auth under Authentication Settings, specify your username and password.
Basic Authentication settings

Custom API key in headers or query params

For some API, you need to pass the API key via Headers or Query Params, e.g. in Hubspot
Custom auth parameters

Usage

Once you have established the connection between UI Bakery and a required application via API, you can further access and manage the data.
Last modified 1mo ago