with Brosix and MEXC?
Brosix is a secure instant messaging platform designed for enterprise communication. With the Brosix API on Pipedream, you can automate various messaging tasks, synchronize communication data across platforms, and trigger workflows from specific events within Brosix. Pipedream's serverless execution model and event-driven architecture enable you to integrate Brosix with numerous other services, enhancing collaboration and productivity without manual intervention.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
brosix: {
type: "app",
app: "brosix",
}
},
async run({steps, $}) {
const data = {
"apikey ": `${this.brosix.$auth.api_key}`,
"msg": `Thees I Like`,
}
return await axios($, {
method: "post",
url: `https://box-n2.brosix.com/api/v1/message/send/`,
data,
})
},
})
import { axios } from "@pipedream/platform";
import crypto from "crypto";
export default defineComponent({
props: {
mexc: {
type: "app",
app: "mexc",
}
},
async run({ steps, $ }) {
// Build query string
const timestamp = Date.now()
const recvWindow = 5000
const queryString = `recvWindow=${recvWindow}×tamp=${timestamp}`
// Generate signature
const signature = crypto
.createHmac('sha256', this.mexc.$auth.secret_key)
.update(queryString)
.digest('hex')
// Make authenticated request
return await axios($, {
method: 'GET',
url: 'https://api.mexc.com/api/v3/account',
headers: {
'X-MEXC-APIKEY': this.mexc.$auth.access_key
},
params: {
recvWindow,
timestamp,
signature
}
})
},
})