Server to server authentication (API keys)

Some APIs require an API key or a simple secret to authenticate the server requests.

Constant secrets and keys

In cases where the API key is always the same, you can add the key to the connection level header parameters. Navigate to Integrations >> Data connections and edit the connection. In the static parameters, add a new Header and provide the correct key value pair for the API key.

Screen shot of API key in data connection

Temporary tokens

In some cases, you need to request a temporary token (with your constant key) from a preliminary endpoint. You can then use the issued token for authentication to a second endpoint. This authentication model can also be achieved by creating two data connections.

First use the "Constant key" method above to make a call to the token issuing endpoint. Simply create a new data connection and add the key to the connection level parameters. Now when you call the connection in your scenario, make sure to save the token issued in the response to a scenario variable.

Screen shot using a temporary token to authenticate a data connection

Now you can then access the temporary token via the variable. In your scenarios make an API call to the secondary endpoint with the temporary token issued by the previous connection. Use a string expression to assign the token as the value for the key in the step level headers.