Professional Documents
Culture Documents
HTTPs GET
Need signature with common params
http host: api.adfly.vn
Signature algorithm
how to get your appKey and appSecret
We have assigned appKey and appSecret to each publisher. The method of obtaining it is shown
in the figure below
required
param Description type range In http
form
1. get appKey and appSecret from our dashboard(ask your BD for Account), each publisher has
its own appKey and appSecret.
2. Combine all of the parameters to a stringToCalcSignature. The format follow:
key=value[,key1=value1]. Keys are sorted by dict order.
3. use sha1.sum(stringToCalcSignature) calc signature
API
Request
Method: HTTPs GET
URI: /api/report/widget
HTTP GET | HTTPs GET
Parameter Description
response
Json body
Parameter
param type range Description
request example
appKey := hayko.tv
Secret := f861789273afca09efda8cfad61b50cf
curl "http://127.0.0.1:15000/api/report/widget?appKey=hayko.tv&begDate=2021-04-
23&country=&deviceId=&endDate=2021-04-
29&nonce=XVlBzg&pid=595&platform=&signature=2d0910e8ed4a42974228e40cc91900c7407d
f9c9×tamp=1619702071583&widgetId=818"
response example
{
"code": 0,
"message": "",
"data": [
{
"date": "2021-04-23",
"impressions": 188209,
"ecpm": 0.0917,
"revenue": 17.2642
},
{
"date": "2021-04-24",
"impressions": 408999,
"ecpm": 0.1076,
"revenue": 44.0067
}
]
}
Request
Method: HTTPs GET
URI: /api/report/widgets
HTTP GET | HTTPs GET
Parameter Description
response
Json body
Parameter
request example
appKey := hayko.tv
Secret := f861789273afca09efda8cfad61b50cf
curl "http://127.0.0.1:15000/api/report/widgets?appKey=hayko.tv&begDate=2021-04-
23&country=&deviceId=&endDate=2021-04-
29&nonce=XVlBzg&platform=&pubId=595&signature=ddf95d41d409a7d1eea8d64f4e4dc45b57
258aff×tamp=1619701107574"
response example
{
"code": 0,
"message": "",
"data": [
{
"widgetId": 818,
"style": "floatIcon",
"widgetName": "Float icon",
"impressions": 2430017,
"ecpm": 0.0789,
"revenue": 191.6749
}
]
}
appendixes
country code
code country
vn Vietnam
th Thailand
id Indonesia
ph the Philippines
my Malaysia
in India
bd Bangladesh
br Brazil
mx Mexico
platform code
ios | android