Create an API Auth Profile
An API Auth Profile tells AutomatedOn how to sign in when it calls another system. Data sources and API requests pick a profile to use.
Before you start
Find out from the other system's supplier how its API expects to be signed in to: with a key in a header, with a fixed token, or with OAuth client credentials (a client ID and secret swapped for a token). For OAuth you'll also need the token endpoint URL and, usually, a scope.
Steps
-
Create the profile
In the back office Content tree, open the menu on your tenant item and create an API Auth Profile. Give it a clear name, such as Aptem live.
-
Choose the Auth Mode
Pick one of the following in Auth Mode:
ApiKey: sends a stored key in a request header.StaticToken: sends a stored token in a request header, by default theAuthorizationheader.ClientCredentials: swaps a stored client ID and secret for an access token at the token endpoint, then sends that token asBearerin theAuthorizationheader.
-
For ClientCredentials, fill in the token details
Enter the Token Endpoint, the URL AutomatedOn requests access tokens from. Enter the Scope if the system needs one. Leave both empty for the other modes.
-
Set the header, if needed
Leave Header Name and Header Scheme empty to use the defaults in the table below. Fill them in when the system expects something different. For example, for a key sent as
x-api-key: yourkey, set Header Name tox-api-keyand leave Header Scheme empty. -
Name the credential
Enter a short, readable Credential Key, such as
CenturyApi. This is the name Three 17 will store your secret under. -
Save, publish and request the secret
Save and publish the profile. Then ask Three 17 support to add the secret for your Credential Key. Never put the secret itself in any field.
More detail
What gets sent
| Auth Mode | Header used if Header Name is empty | Value sent if Header Scheme is empty | What Three 17 stores |
|---|---|---|---|
ApiKey | x-api-token | The key on its own | A token (your key) |
StaticToken | Authorization | The token on its own | A token |
ClientCredentials | Authorization | Bearer followed by the access token | A client ID and client secret |
If you fill in Header Scheme, it's added in front of the value with a space, in any mode. For example, a StaticToken profile with Header Scheme set to Bearer sends Authorization: Bearer yourtoken.
The back office describes Header Name as defaulting to Authorization. That's true for StaticToken and ClientCredentials, but ApiKey mode defaults to x-api-token. If your system expects a different header, always fill in Header Name.
About ClientCredentials tokens
AutomatedOn requests a token with the client credentials grant, reuses it until shortly before it expires, and fetches a fresh one automatically. If a system rejects a request as unauthorised, AutomatedOn gets a new token and tries once more.
What happens next
When Three 17 confirms the secret has been added, select Test Connection on the profile to check it.