import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
discord_bot: {
type: "app",
app: "discord_bot",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://discord.com/api/users/@me`,
headers: {
"Authorization": `Bot ${this.discord_bot.$auth.bot_token}`,
},
})
},
})
Discord Bot uses API keys for authentication. When you connect your Discord Bot account, Pipedream securely stores the keys so you can easily authenticate to Discord Bot APIs in both code and no-code steps.
If you haven't created a Discord bot, see these instructions or watch this video. You'll need to add this bot to your server(s).
Once you've created your bot, you'll find the Bot token within the Bot section of your app.