βοΈAuthentication
Last updated
Last updated
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.playtimeads.com/Api/Offers',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'AppKey: <YOUR_APP_KEY>',
'AppSecretKey: <YOUR_SECRET_KEY>'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;{
"total_offers": 1,
"total_page": 1,
"page": 1,
"limit": 1000,
"Offers": [
{
"campaignId": "XXXXXX01",
"totalPayout": 9.999,
"status": "active",
"campaignName": "Sample Game Campaign",
"description": "<p>Step 1: Tap Play Now and install the app.<br />\r\nStep 2: Open the app to start.<br />\r\nStep 3: Complete the first level.<br />\r\nStep 4: Keep playing to earn more rewards!</p>\r\n",
"model": "CPL",
"app": {
"title": "Sample Game",
"packageName": "com.example.samplegame",
"previewUrl": "https://play.google.com/store/apps/details?id=com.example.samplegame",
"logo": "https://example.com/images/sample_logo.jpg",
"bannerImage": "https://example.com/images/sample_thumbnail.jpg"
},
"currency": {
"name": "USD",
"symbol": "$"
},
"payoutEvents": [
{
"event": "level_1_complete",
"eventTitle": "Complete Level 1",
"eventDesc": "",
"payoutAmount": 0.010,
"targetCaps": "0"
},
{
"event": "level_5_complete",
"eventTitle": "Complete Level 5",
"eventDesc": "",
"payoutAmount": 0.050,
"targetCaps": "0"
},
{
"event": "level_10_complete",
"eventTitle": "Complete Level 10",
"eventDesc": "",
"payoutAmount": 0.500,
"targetCaps": "0"
},
{
"event": "boss_level_complete",
"eventTitle": "Defeat Final Boss",
"eventDesc": "",
"payoutAmount": 1.000,
"targetCaps": "0"
},
{
"event": "game_completed",
"eventTitle": "Finish the Game",
"eventDesc": "",
"payoutAmount": 5.000,
"targetCaps": "0"
}
],
"targeting": {
"os": "android",
"countries": [
{
"iso": "US"
}
]
},
"tracking": {
"clickUrl": "http://tracking.example.com/track/oa/XXXXXXX/XXXXXX01/?clickId={clickId}&gaid={gaid}&sub1={sub1}...&sub10={sub10}",
"impressionUrl": "https://tracking.example.com/i/XXXXXX01/{publisher_id}"
}
}
]
}