import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
opencti: {
type: "app",
app: "opencti",
}
},
async run({steps, $}) {
const data = {
"query": `query GetMyAccount { me { id name user_email } }`,
}
return await axios($, {
method: "post",
url: `${this.opencti.$auth.api_url}/graphql`,
headers: {
Authorization: `Bearer ${this.opencti.$auth.api_key}`,
"content-type": `application/json`,
},
data,
})
},
})
OpenCTI uses API keys for authentication. When you connect your OpenCTI account, Pipedream securely stores the keys so you can easily authenticate to OpenCTI APIs in both code and no-code steps.