API Authentication
Last updated
Was this helpful?
Last updated
Was this helpful?
You can configure your HTTP API as a data source if it requires authentication with a specific set of headers or other query params so you won't need to configure these parameters with every request.
This article describes all available authentication methods when connecting your data source.
The following standard types of authentication are available for HTTP API:
For some API, you may need to pass the API key via Headers or Query Params, for example, in . You need to add them to the corresponding fields and proceed with connecting your data source.
With this authentication method, you only need to provide your username and password.
Digest Auth is similar to Basic Auth but with more focus on security. In Basic Auth, a user sends their credentials in plain text to the server thus making them easy to be intercepted by a middleman. Digest Auth, on the other hand, uses encryption algorithms to secure the transmission of user credentials.
With this authentication method, you only need to specify your username and password.
OAuth 2.0 is the protocol that allows UI Bakery to access data sources hosted by other web apps on behalf of the user.
Once you've selected this method, you can also choose a specific flow in the OAuth2 Flow dropdown:
Authorization Code Flow
Client Credentials Flow
Password Grant
The following parameters are available for the configuration:
UI Bakery redirect callback - Read only, should be set in the API OAuth settings
Client ID & Client secret - should be filled with values provided by the API
Authorization URL & Access Token URL - should be filled with values provided by the API
Additional params for Access Token request - any additional parameters that need to be added to the access token, for example, entity_id
. They are added to the access token request's body.
Scope - a space-delimited list of permissions granted to the data source
In the Data source configuration, you can use the UI_BAKERY_OAUTH2_TOKEN
placeholder which will be replaced with the token value during the request. If the ID token was requested, you can use the UI_BAKERY_OAUTH2_ID_TOKEN
placeholder as well.
By default, the header Authorization: Bearer UI_BAKERY_OAUTH2_TOKEN
will be automatically added to each request to the data source with OAuth 2.0 enabled. You can override this behavior by adding your own Authorization header.
On the Enterprise plan, you can use the UI_BAKERY_SSO_TOKEN
placeholder - it will be replaced by the token from the SSO authentication.
UI Bakery will try to automatically refresh the token if it's returned by API during authorization. If token refresh is not possible, the users will be prompted to give access each time the token expires.
This authentication method involves sending an API key along with the request. An API key is a unique identifier issued by the API provider to authorized users or applications and is used to identify and track API usage.
The API Key you specify in the Authentication settings section will be added as an Authorization header with the Bearer {API_KEY}
value and it will be encrypted.
Once you have established the connection between UI Bakery and the required application via API, you can further access and .