Now that you understand the different types of credentials and how to create them, let's explore how to put them to work in your stories! The primary way you'll use credentials is with the HTTP Request action, which serves as your workflow's gateway to the outside world.
CREDENTIAL key
The CREDENTIAL key allows you to directly reference credential values. This is especially helpful when setting up your authentication in an HTTP Request action. For example, if we needed to authenticate an HTTP Request action reaching out to an endpoint, we can simply reference it in the HTTP Request action's configuration like so:
CREDENTIAL.credential_nameAt run-time, the credential will be passed along with the HTTP Request to the API endpoint, authenticating the request.
INFO key
The INFO key provides metadata about resources, rather than their actual values. Similar to the resources capability, this can be useful for checking credential properties, like its unique ID.
For example, if we need to update a credential's value via our update credential API endpoint, we can utilize the INFO key in a pill to pull the credential's ID needed for this endpoint to execute successfully, like so:
INFO.credential.credential_name.idWhen the action runs, it'll return the ID value of the credential.
Connect to your tool stack with the HTTP Request action
As we covered in our Tines Foundations learning path, the HTTP Request action is one of the most powerful tools in your Tines toolkit. It allows your workflows to communicate with external systems, APIs, and services. Think of it as the messenger that can both gather information from other systems and send instructions to them.
Most tools' API endpoints will require authentication. This is where the HTTP Request action and credentials come together to get it done.