Grow Your Coaching Business Faster With Funnels, Blog, Website, CRM, Courses, Payments, Email & Text Marketing, Follow-Up System, Zoom, and More.
Go to siteimport { axios } from "@pipedream/platform"
export default defineComponent({
props: {
attractwell: {
type: "app",
app: "attractwell",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.attractwell.com/api/v1/campaigns`,
headers: {
Authorization: `Bearer ${this.attractwell.$auth.oauth_access_token}`,
},
})
},
})
AttractWell uses OAuth authentication. When you connect your AttractWell account, Pipedream will open a popup window where you can sign into AttractWell and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any AttractWell API.
Pipedream requests the following authorization scopes when you connect your account:
GET
https://attractwell.com/app/oauth/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
POST
https://api.attractwell.com/api/v1/oauth/grant
accept: application/json
Content-Type: application/x-www-form-urlencoded
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=authorization_code
&
redirect_uri={{oauth.redirect_uri}}
&
code={{oauth.code}}
POST
https://api.attractwell.com/api/v1/oauth/refresh
content-type: application/x-www-form-urlencoded
accept: application/json
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}