with Instasent and SMS Messages?
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
instasent: {
type: "app",
app: "instasent",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.instasent.com/organization/account`,
headers: {
Authorization: `Bearer ${this.instasent.$auth.api_token}`,
"accept": `application/json`,
},
})
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
sms_messages: {
type: "app",
app: "sms_messages",
}
},
async run({steps, $}) {
const data = {
"sms":
{
"user":`${this.sms_messages.$auth.username}`,
"dst":
{
"num":
[
"++3460000000"
]
},
"txt":"Hello world!"
}
}
return await axios($, {
method: "post",
url: `https://api.lleida.net/sms/v2/`,
headers: {
"content-type": `application/json; charset=utf-8`,
"accept": `application/json`,
"authorization": `x-api-key ${this.sms_messages.$auth.api_key}`,
},
data,
})
},
})