import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
smartthings: {
type: "app",
app: "smartthings",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.smartthings.com/v1/devices`,
headers: {
Authorization: `Bearer ${this.smartthings.$auth.token}`,
},
})
},
})
Samsung SmartThings uses API keys for authentication. When you connect your Samsung SmartThings account, Pipedream securely stores the keys so you can easily authenticate to Samsung SmartThings APIs in both code and no-code steps.
Personal access tokens are used to authorize interaction with the API for non-SmartApp use cases. Personal access tokens can be created on the personal access tokens page. See docs.