Skip to content

Instantly share code, notes, and snippets.

@cfjedimaster
Created April 3, 2023 13:23
Show Gist options
  • Save cfjedimaster/867a554f8f046ac357c89ae156441aae to your computer and use it in GitHub Desktop.
Save cfjedimaster/867a554f8f046ac357c89ae156441aae to your computer and use it in GitHub Desktop.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
dropbox: {
type: "app",
app: "dropbox",
}
},
async run({steps, $}) {
const data = {
"account_id": `${this.dropbox.$auth.oauth_uid}`,
}
return await axios($, {
method: "post",
url: `https://api.dropboxapi.com/2/users/get_account`,
headers: {
Authorization: `Bearer ${this.dropbox.$auth.oauth_access_token}`,
"Content-Type": `application/json`,
},
data,
})
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment