import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
murf: {
type: "app",
app: "murf",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.murf.ai/v1/speech/voices`,
headers: {
"api-key": `${this.murf.$auth.api_key}`,
"token": `${this.murf.$auth.token}`,
},
})
},
})
Murf uses OAuth authentication. When you connect your Murf account, Pipedream will open a popup window where you can sign into Murf and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Murf API.
Pipedream requests the following authorization scopes when you connect your account:
GET
https://api.murf.ai/v1/auth/token
api-key: {{custom_fields.api_key}}
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
GET
https://api.murf.ai/v1/auth/token
api-key: {{custom_fields.api_key}}