You can find the official documentation here.
The QualtricsInR package provides a general R wrapper for the Qualtrics API v3 references. The package is built accross the main API calls to manipulate survey objects and responses, as well as general survey and account admnistration functions.
The package was created in order to address the needs of large scale survey projects where the management and handling of multiple surveys can benefit from automation through the API.
There are other important R packages available to automate different aspects of survey manipulation in Qualtrics. The qualtRics R package implements the retrieval of survey data using the Qualtrics API and is currently the only package on CRAN that offers such functionality.
Other related packages are available through Github. Jason Bryer’s R package to work with the previous version of the Qualtrics API. QualtricsTools creates automatic reports in shiny and qsurvey, by James Dunham, focuses on testing and review of surveys before fielding, as well as the analysis of responses afterward.
You can install QualtricsInR from github using the devtools package.
devtools::install_github('ppssphysics/QualtricsInR')
The package is made available on GitHub in order to collect feedback from the community before we consider a submission to CRAN.
We provide two authentication methods to set-up your Qualtrics credentials:
Both are valid methods. All information on how to retrieve identification parameters and generete tokens from your Qualtrics account can be found here.
For convenience, we recommend you define your API token and Qualtrics Data Center ID (optional) in your .Renviron with the names QUALTRICSINR_TOKEN
and QUALTRICSINR_DATA_CENTER
respectively. Upon loading the QualtricsInR package, your credentials will be automatically set as internal encrypted parameters.
You can always custom set your credentials by calling the set_qualtrics_opts()
function:
# set auth options assuming definition in .Renviron set_qualtrics_opts() # set auth options by hand set_qualtrics_opts("9ssssss83jsl83282032932sds2", "mydatacenter")
If you use this method, you will have set your credentials for every new session.
To generate an OAuth application, follow the steps below in your Qualtrics account:
qualtrics_auth
, as below.qualtrics_auth(id = "xXxxX0X0x", secret = "xXxxX0X0x", data_center = "my.center")
This will authenticate you, returning a bearer token valid for one hour, saving the encrypted credentials in a .qualtrics-oauth
file, which will be automatically loaded in all subsequent sessions and automatically refreshed if need be. You should therefore only find the need to run qualtrics_auth
once.
There are close to 200 different API calls provides by Qualtrics. Depending on interest, demand, and help from the community, efforts will be dedicated to the testing and implementation of missing references. Most of the XM Directory related calls are not implemented due to not having access to this feature in our own account.