import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
speak_ai: {
type: "app",
app: "speak_ai",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.speakai.co/v1/admin/users`,
headers: {
"x-speakai-key": `${this.speak_ai.$auth.api_key}`,
"x-access-token": `${this.speak_ai.$auth.oauth_access_token}`,
},
})
},
})
Speak AI uses OAuth authentication. When you connect your Speak AI account, Pipedream will open a popup window where you can sign into Speak AI and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Speak AI API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://api.speakai.co/v1/auth/accessToken
accept: application/json
x-speakai-key: {{custom_fields.api_key}}
POST
https://api.speakai.co/v1/auth/refreshToken
x-speakai-key: {{custom_fields.api_key}}
refreshToken={{custom_fields.refresh_token}}