With the Affinity API, you can build a variety of applications that work with Affinity data, including:
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
affinity: {
type: "app",
app: "affinity",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.affinity.co/persons`,
auth: {
username: ``,
password: `${this.affinity.$auth.api_key}`,
},
params: {
term: `doe`,
},
})
},
})
Affinity uses API keys for authentication. When you connect your Affinity account, Pipedream securely stores the keys so you can easily authenticate to Affinity APIs in both code and no-code steps.
To use the Affinity API, an API secret key needs to be generated. This can be done easily through the Settings Panel that is accessible through the left sidebar on the Affinity web app.