Create and sell online courses from your own website. The best online course platform for creating, selling and promoting your online courses. Start monetizing your skills, experiences and your audience.
Go to siteimport { axios } from "@pipedream/platform"
export default defineComponent({
props: {
learnworlds: {
type: "app",
app: "learnworlds",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.learnworlds.$auth.school_domain}/admin/api/v2/users`,
headers: {
Authorization: `Bearer ${this.learnworlds.$auth.oauth_access_token}`,
"Lw-Client": `${this.learnworlds.$auth.oauth_client_id}`,
},
})
},
})
LearnWorlds uses OAuth authentication. When you connect your LearnWorlds account, Pipedream will open a popup window where you can sign into LearnWorlds and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any LearnWorlds API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://{{custom_fields.school_domain}}/admin/api/oauth2/access_token
accept: application/json
Lw-Client: {{oauth.client_id}}
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=client_credentials
POST
https://{{custom_fields.school_domain}}/admin/api/oauth2/access_token
accept: application/json
Lw-Client: {{oauth.client_id}}
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=client_credentials