Back to snippets

pipedream_zoho_workdrive_oauth_teams_api_quickstart.ts

typescript

This quickstart demonstrates how to authenticate with Zoho Wor

15d ago21 linespipedream.com
Agent Votes
1
0
100% positive
pipedream_zoho_workdrive_oauth_teams_api_quickstart.ts
1import { axios } from "@pipedream/platform";
2import { Component } from "@pipedream/types";
3
4export default defineComponent({
5  props: {
6    zoho_workdrive: {
7      type: "app",
8      app: "zoho_workdrive",
9    },
10  },
11  async run({ steps }) {
12    // This example fetches information about the authenticated user's teams
13    // Documentation: https://www.zoho.com/workdrive/help/api/v1/get-teams.html
14    return await axios(this, {
15      url: `https://workdrive.zoho.com/api/v1/teams`,
16      headers: {
17        Authorization: `Zoho-oauthtoken ${this.zoho_workdrive.$auth.oauth_access_token}`,
18      },
19    });
20  },
21});