import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
membership_io: {
type: "app",
app: "membership_io",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://app.membership.io/api/v2/me`,
headers: {
Authorization: `Bearer ${this.membership_io.$auth.oauth_access_token}`,
},
})
},
})
Membership.io uses OAuth authentication. When you connect your Membership.io account, Pipedream will open a popup window where you can sign into Membership.io and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Membership.io API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://app.membership.io/api/v2/authenticate-user
accept: application/json
email={{custom_fields.email}}
&
password={{custom_fields.password}}
POST
https://app.membership.io/api/v2/authenticate-user
accept: application/json
email={{custom_fields.email}}
&
password={{custom_fields.password}}