import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
sendpulse: {
type: "app",
app: "sendpulse",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.sendpulse.com/senders`,
headers: {
Authorization: `Bearer ${this.sendpulse.$auth.oauth_access_token}`,
},
})
},
})
SendPulse uses OAuth authentication. When you connect your SendPulse account, Pipedream will open a popup window where you can sign into SendPulse and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any SendPulse API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://api.sendpulse.com/oauth/access_token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.ID}}
&
client_secret={{custom_fields.Secret}}
&
grant_type=client_credentials
POST
https://api.sendpulse.com/oauth/access_token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.ID}}
&
client_secret={{custom_fields.Secret}}
&
grant_type=client_credentials