The following guide will walk you through how to export user IDs from Leanplum, along with 1 custom user attribute, associated with those users.
We recommend installing Postman and importing Leanplum's API collection for easier use. Alternatively, you can copy-paste the API calls in your browser's URL bar.
Export all User IDs:
- Export CSV file with the user IDs and the desired user attribute via exportUsers API call. Replace the values in bold. Get your API keys from Development > App settings in the top navigation bar.
- Use the job ID form the response of step 1. Make a getExportResults API call and download your file, once the job is done and a download URL is returned. Example getMultiResults API call:
https://api.leanplum.com/api?action=getExportResults&appId=APP_ID&clientKey=EXPORT_KEY&apiVersion=1.0.6&jobId=JOB_ID
Example exportUsers API calls:
Export all User IDs:
- With 1 chosen user attribute:
https://api.leanplum.com/api?action=exportUsers&appId=APP_ID&clientKey=EXPORT_KEY&apiVersion=1.0.6&userAttribute=ATTRIBUTE_NAME
- Without user attribute:
https://api.leanplum.com/api?action=exportUsers&appId=APP_ID&clientKey=EXPORT_KEY&apiVersion=1.0.6
Export User IDs from a saved audience:
- With 1 chosen user attribute:
https://api.leanplum.com/api?action=exportUsers&appId=APP_ID&clientKey=EXPORT_KEY&apiVersion=1.0.6&audienceName=AUDIENCE_NAME&userAttribute=ATTRIBUTE_NAME
- Without user attribute:
https://api.leanplum.com/api?action=exportUsers&appId=APP_ID&clientKey=EXPORT_KEY&apiVersion=1.0.6&audienceName=AUDIENCE_NAME
Additional resources:
You can use the downloaded CSV file to then filter out users and make a CSV upload with updated data for them.