



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:
Log into Stonly and open the AI & Automation tab.
In the sidebar, open Server calls.
Switch to the Authentication view.
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.

Managing and deleting authentication configuration
To edit or delete an auth config:
Hover over a configuration in the Authentication view.
Click on the … icon.
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.