import { TuyaContext } from '@tuya/tuya-connector-nodejs';
export default defineComponent({
props: {
tuya: {
type: "app",
app: "tuya",
}
},
async run({steps, $}) {
const tuya = new TuyaContext({
baseUrl: `${this.tuya.$auth.base_url}`,
accessKey: `${this.tuya.$auth.client_id}`,
secretKey: `${this.tuya.$auth.client_secret}`,
});
return await tuya.user.users({
last_row_key: '',
page_size: 20,
});
},
})
Tuya uses API keys for authentication. When you connect your Tuya account, Pipedream securely stores the keys so you can easily authenticate to Tuya APIs in both code and no-code steps.
To retrieve your API Credentials "Access ID/Client ID" and "Access Secret/Client Secret",