This API facilitates the retrieval of information of users by specifying the user IDs.
Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format 'username:password'.
Note: After you generate and save the Data API Key, DO NOT generate a new key unless there is a security breach. After you generate a different Data API key and save it, the authentication will start failing. You must update your existing data tracking.
For more information on authentication and getting your credentials, refer here.
The 'X-Forwarded-For' header is used to specify the IP address of the client that made the request. This header may be added by proxy servers or load balancers. The header value must contain the IP address of the original client that initiated the request. Multiple IP addresses may be specified in the header value, separated by commas.
"203.0.113.195"
This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
"VJ0GSMESHMQA3L7WV1EEK3UR"
This field is used to specify the identifiers for the users for whom the data needs to be fetched. Structure:
"identifiers": [
{
"identifier_type": "customer_id",
"identifier": "<customer_id>"
},
{
"identifier_type": "id",
"identifier": "<MoEngageID>"
},
...{}
]This field is used to specify the fields that need to be fetched for the user specified in Identifiers. Tracked standard user attributes and custom attributes can be fetched using this API. For the list of tracked standard attributes in MoEngage, refer to User Attributes.
["last_name", "customer_id", "name"]This response is returned when the request is processed successfully.
This field contains the status of the request and specifies whether the request was successful. Supported values are : "success", "failure"
"success"
This field denotes the fetch type. Supported values are: "export_users".
"export_users"
This field contains the list of users who were not found in MoEngage and returns the data specified for the list of users who were found in MoEngage.
This is the structure:
{
"users_not_found": [
{
"identifier_type": "customer_id",
"identifier": "<customer_id>"
}
],
"users": [
{
"user_attributes": {
"<list of user attributes>"
}
}
]
}