1

I am trying to call the Amplitude Export API (link here: https://developers.amplitude.com/docs/export-api) with R.

Below is the explanation but I really don't see how to apply the following using a function like GET or curl functions.

curl -u API_Key:Secret_Key 'https://amplitude.com/api/2/export?start=20150201T5&end=20150203T20' >> yourfilename.zip
Mogsdad
  • 44,709
  • 21
  • 151
  • 275
ML_Enthousiast
  • 1,147
  • 1
  • 15
  • 39

1 Answers1

1

No really an R expert but something like this should work

require(httr)

params = list(
  `start` = '20150201T5',
  `end` = '20150203T20'
)

res <- httr::GET(url = 'https://amplitude.com/api/2/export', query = params, httr::authenticate('API_Key', 'Secret_Key'))
Kimmo Hintikka
  • 13,472
  • 7
  • 34
  • 63