2

I am in the process of migrating my Parse push notification data to CleverTap. The problem that I am having is that the documentation is not very good about it and the examples that they give don't cover push notifications.

Anyone have an example of how to send pushes with CleverTap API using Python or at least evidence that this is possible?

therealprashant
  • 701
  • 15
  • 27
estemendoza
  • 3,023
  • 5
  • 31
  • 51

1 Answers1

-1

The documentation now covers how to migrate your Parse installations to CleverTap. For example, say we are creating a push notification to be sent to users subscribed to the "yankees" and "mets" channels.

curl -H "Content-Type:application/json"
 -H "X-CleverTap-Account-ID: Your CleverTap Account ID"
 -H "X-CleverTap-Passcode: Your CleverTap Account Passcode"
 --data "@payload"
 "https://api.clevertap.com/1/targets/create.json"

Payload

"name": "My API Campaign",
"where": {
    "common_profile_prop": {
        "profile_fields": [
            {
                "name": "channels",
                "value": ["yankees", "mets"]
            }
        ]
    }
},
"content":{
    "title": "Breaking News",
    "body": "Yankees Win 5-4",
    "platform_specific": {
        "ios": {
            "deep_link": "example.com",
            "sound_file": "example.caf",
            "category": "reactive",
            "badge_count": 1,
            "key": "value_ios"
        },
        "android": {
            "background_image": "http://example.jpg",
            "default_sound": true,
            "deep_link": "example.com",
            "key": "value_android"
        }
    }
},
"devices": [
    "android",
    "ios",
],
"when": "now"
}

Response

{
"status": "success",
"id": 1457433898,
"estimates": {
    "android": 90,
    "ios": 300
}
}

Hope this helps. More documentation can be found here - https://github.com/CleverTap/parse-migrate

helloanand
  • 340
  • 1
  • 6
  • 1
    would this be better as a comment than an answer? generally people want a full explanation from an answer, not just a link to a full explanation. – abcd Apr 12 '16 at 20:33
  • How to send image in notification tray in ios devices? With android I am able to achieve it with image url – Shubh Mar 25 '21 at 11:12