import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
bandwidth: {
type: "app",
app: "bandwidth",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://dashboard.bandwidth.com/api/accounts/${this.bandwidth.$auth.accountId}/applications`,
auth: {
username: `${this.bandwidth.$auth.username}`,
password: `${this.bandwidth.$auth.password}`,
},
})
},
})
Bandwidth uses API keys for authentication. When you connect your Bandwidth account, Pipedream securely stores the keys so you can easily authenticate to Bandwidth APIs in both code and no-code steps.
Bandwidth.com requires the user's username:password
pair to be encoded as part of the header. (docs)
The accountId
is used as part of the url to make API requests. Ex: https://dashboard.bandwidth.com/api/accounts/{accountId}/