Hello - I have switched from using axios requests ...
# questions
g
Hello - I have switched from using axios requests to fetch the data export API to using the SDK. I was able to successfully authenticate with axios, but the SDK throws an authentication error
"Unable to authenticate request"
. Our implementation below - are the additional values required to connect with the SDK?
Copy code
const sdk = require('api')('@mixpaneldevdocs/v3.08#4baji19kzq4bi6j')

sdk.auth(
  process.env.MIXPANEL_EVENT_API_USER,
  process.env.MIXPANEL_EVENT_API_PASS,
)

.rawEventExport({
  from_date: startDate,
  to_date: endDate,
  project_id: process.env.MIXPANEL_EVENT_API_COMPARISONS_ID,
  accept: 'text/plain',
})
.then(({ data }) => console.log(data))
.catch(err => console.error(err))