Authentication view in server call settings.
Dropdown menu for an authentication configuration.
Authentication view in server call settings.

Adding authentication configuration

Most APIs will require authentication credentials, so they can recognize the request from Stonly is actually coming from you.

To add a new authentication configuration:

  1. Log into Stonly and open the AI & Automation tab.

  2. In the sidebar, open Server calls.

  3. Switch to the Authentication view.

  4. Click Add authentication configuration.

Setting up authentication credentials

Add a name and description for your auth config.

Next, select the authentication type used by the API you'll be calling. Currently, we support Basic auth, API keys and OAuth 2.0 (client credentials flow).

Basic auth

For basic auth, you will need to provide username and password to authenticate the call.

API keys

If you're authenticating with an API key, you will need to define:

  • Where to add the key in the request (inside the header or query parameters).

  • Key. The name of the header or query parameter where the API key is included.

  • Value. The actual API key.

OAuth 2.0

With OAuth authentication, you should specify:

  • Client ID and Client secret. They will be used to authenticate the call.

  • Authorization server URL. URL to which the request is sent.

  • Whether the credentials should be passed in the Body (x-www-urlencoded) or Header of the request.

Optionally, you can add Scopes to request specific types of access to the API.

For OAuth 2.0 there is also a test functionality. After you've filled in the required fields, click Test OAuth 2.0 credentials to verify the authentication works. If the test request fails to authenticate, we will display an appropriate error code.

Dropdown menu for an authentication configuration.

Managing and deleting authentication configuration

To edit or delete an auth config:

  1. Hover over a configuration in the Authentication view.

  2. Click on the icon.

  3. Choose appropriate option from the dropdown menu.

Deleting configurations

You can only delete a configuration if it is not currently part of any server calls.

If you try to delete an auth config that's currently in use, we will display a warning with a list of all server calls that are relying on this configuration.