1

I want to know if there is a way to retrieve Device IDs from MobilePush using REST and the Contact Key.

I've tried searching on the developer webiste but nothing matches what I need.

Any ideas would be welcome.

Thanks.

1 Answer 1

1

You can do that with the /contacts/v1/attributes/search endpoint. Example payload:

{
    "request": {
        "attributes": [
            {
                "key": "MobilePush Demographics.Device Id"
            },
                        {
                "key": "MobilePush Demographics.System token"
            },
            {
                "key": "Contact.Contact ID"
            },
            {
                "key": "Contact.Contact Key"
            }
            ]

    },
    "conditionSet": {
        "operator": "And",
        "conditionSets": [],
        "conditions": [{
            "attribute": {
                "key": "MobilePush Demographics.Device Id"
            },
            "operator": "IsNotNull",
            "value": {}
        },
        {
            "attribute": {
                "key": "Contact.Contact Key"
            },
            "operator": "IsNotNull",
            "value": {}
        }]
    }
}

You can use the conditionSet to search for contact key or other attributes. You can find out what is possible within conditionSet with the /contacts/v1/dataTypes endpoint (source).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .