This endpoint returns User and Profile information for the POOL User account.
Example JSON Output
{
"caps_space": "0,0,0,0,0,0",
"company": "Promo Only",
"dj_alias": "POOL Test DJ",
"dj_program": 1,
"dj_types":
[
{
"id": 9,
"selected": 0,
"type": "Bars"
},
{
"id": 3,
"selected": 1,
"type": "Bowling Alleys"
},
{
"id": 6,
"selected": 0,
"type": "Clubs"
},
{
"id": 7,
"selected": 0,
"type": "Corporate Events"
},
{
"id": 10,
"selected": 0,
"type": "Festivals"
},
{
"id": 14,
"selected": 0,
"type": "Gentlemen's Clubs"
},
{
"id": 8,
"selected": 0,
"type": "Mitzvahs"
},
{
"id": 1,
"selected": 1,
"type": "Mobile DJ"
},
{
"id": 11,
"selected": 0,
"type": "Radio"
},
{
"id": 5,
"selected": 1,
"type": "School Dances"
},
{
"id": 2,
"selected": 1,
"type": "Skating Rinks"
},
{
"id": 13,
"selected": 0,
"type": "Social Events"
},
{
"id": 12,
"selected": 1,
"type": "Sporting Events"
},
{
"id": 4,
"selected": 0,
"type": "Weddings"
}
],
"dj_types_indexes": "3,1,5,2,12",
"download_location": "/Users/User/Music/pool",
"duplicate_files_index": 1,
"duplicate_option": 1,
"file_naming": "2,1,1,0,3,3,1,0,0,1,0,0,0",
"format_audio": 1,
"format_video": 1,
"hide_singles": 0,
"industry": "Radio/Broadcast",
"last_login": "Mon, 06 Apr 2020 16:51:12 GMT",
"last_update": "Mon, 06 Apr 2020 16:51:21 GMT",
"name_first": "POOL",
"name_last": "User",
"no_duplicates": 0,
"notify_frequency": 2000,
"phone": "407-331-3600",
"report_opt": 1,
"session_location": "/Users/User/Music/_Serato_/History/Sessions",
"title": "POOL Test User",
"userid": 1
}
PHP (using cURL):
<?php
$userid = 1;
$token = "8b26e1e4f3f5e00a888807e605565c47";
$api_url = "https://api.promoonly.com/user/info";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: Bearer ".base64_encode($userid.":".$token)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$api_result = curl_exec($ch);
curl_close($ch);
$api_obj = json_decode($api_result);
?>
Javascript (using jQuery):
function b64EncodeUnicode(str)
{
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,
function toSolidBytes(match, p1)
{
return String.fromCharCode('0x' + p1);
}));
}
var userid = 1;
var token = "8b26e1e4f3f5e00a888807e605565c47";
var auth_str = "Bearer " + b64EncodeUnicode(userid + ":" + token);
$.ajax({
type: "GET",
url: "https://api.promoonly.com/user/info",
headers: { "Authorization": auth_str },
dataType: "json",
success: function (data)
{
console.log(data);
}
});
Python (using requests):
#!/usr/bin/env python
import requests
import base64
import urllib
userid = 1
token = "8b26e1e4f3f5e00a888807e605565c47"
b64_key = base64.b64encode("%s:%s" % (userid, token))
headers = {"Authorization": "Bearer %s" % b64_key}
api_url = "https://api.promoonly.com/user/info"
result_return = requests.get(api_url, headers=headers)
print(result_return.text)