hasoffers 官网 : http://www.hasoffers.com/
hasoffers帮助文档 : http://support.hasoffers.com/
hasoffers API文档: http://developers.hasoffers.com/#/brand
hasoffers后台登陆: https://XXXX.hasoffers.com/loginXXXX为公司申请的账号
最近研究了一段时间的hasoffers, 发现这家伙太强大了,一个广告平台做如此强大,让我等开发人员实在没少费心思研究,现在把研究结果记录下来,以供学习
Getting Started with the Brand API
Requirements
- In order to use the API, your network must be on the Enterprise pricing plan or a Dedicated solution.
- All requests require an API Key, which is a randomly generated string unique to your network.
- IP address making request must have been submitted to the white-list for API access.
- Additionally, all requests require your Network ID.
Creating an API Key
- API keys can be created from within the application:
- Log into the application and hover over the Support tab in the Navigation Bar, and click on the "API" link from the drop-down.
- If you don't already have an API Key there will be a notice underneath the Navigation Bar with a link to create one.
- Once you've created one, the page will display your private API Key. It will begin with the letters 'NET'.
- You can also talk to your Account Manager about creating and obtaining your API Key
While-list IP Address
- White-listing an IP address can be added from within the application:
- Hover over the Support tab in the Navigation Bar and click on the API link from the drop-down.
- There will be a box underneath your API Key to submit an IP address to whitelist.
- Additional IP addresses can be added to the while-list using the API method:
Rate Limiting
- Networks are limited to 50 API calls every 10 seconds. If you require a higher limit, please contact your account manager.
Making a Request
Your Network's API Key and Network ID are used to authenticate requests through the API. Every API request must have a valid API Key and Network ID combination. When making an API Request,use your API Key value for the NetworkToken parameter, and your Network ID for the NetworkId parameter.
加黑的是比较关键的两个参数 API Key = NetworkToken , Network ID = NetworkId 。提取关键内容才是最重要的。这两个东西在support API 中。
Example Usage
- Network ID is demo
- API key is NETabc123
- Request is
- Offer ID is 42
- Request URL:
https://api.hasoffers.com/Api/json?NetworkId=demo&NetworkToken=NETabc123&Target=Offer&Method=findById&id=42
- Sample Response:
{ "request": { ...collapsed JSON data }, "response": { "status": 1, "httpStatus": 200, "data": { "Offer": { "id": "42", "name": "My Test Offer" } }, "errors": [], "errorMessage": null }}
剩下的就是研究API了,好繁琐,基本上所有的接口都有了,好强大的,待我等慢慢嗅探。