Permissions API Documentation

From docs.airnowmedia.com
Jump to: navigation, search

Contents

About

For developers who wish to tightly control which users receive ads beyond the targeting settings available in the portal, you can use our API to add IMEI's to a blacklist or whitelist. The settings can be changed in the 'API' menu item of the developer portal:

Blacklist Mode: The default mode, in blacklist mode you can specify IMEI's who will NOT receive ads. This works well for building opt-out interaction within your app.

Whitelist Mode: If you switch your app to whitelist mode, all IMEI's will be blacklisted unless you expressly add them to the whitelist to receive ads. This is useful for building opt-in interaction within your app.

Generate API Key

To use our API, you will need to generate an API key. Please check the "Generate new API Key" option within your developer portal to generate your account API. This can be deactivated at any time by checking the "Deactivate API" option.

API Specs

The Permissions API allows a developer to Add, Remove IMEI in whitelist/blacklist using an HTTP based service. In order to use Permissions API, you will need an API access key which can be generated from the “Generate API Key” section within your developer portal.

Please note: For the privacy of your users, Airnow Monetization never stores personally identifiable information. Our SDK encrypts all IMEI numbers using md5 hashing.

Blacklist Mode:

This is the default mode for your application once the Permissions API is activated. In blacklist mode, all the subscribers of registered application will qualify for receiving ads except those blacklisted.

Add Blacklist IMEI

Developer sends an ‘add blacklist IMEI’ request to add an IMEI to blacklist in Airnow Monetization database. Note: In blacklist mode, blacklisted IMEIs will NOT qualify to receive push notification ads from Airnow Monetization.

URL - http://api.airpush.com/api.php
Supported request methods - GET, POST
Requires Authentication - Yes, API AUTH KEY
Parameters:

Model "app"
Action "add_imei_black"
APIKEY Generated API Key
AppId App id of application give above
IMEI Md5 encrypted IMEI that needs to be added in blacklist

Response Details - Upon successful blacklisting of an IMEI, server responds back with int value 1 along with the HTTP status code 200 (Created). If parameters are invalid, server will return HTTP status code as 400 and in case of any other errors server will respond back with the specific error code.

Sample Code:

http://api.airpush.com/api.php?model=app&action=add_imei_black&APIKEY=apikey&appId=appid&imei=UserEncryptedIMEI

Check Blacklist IMEI

Developer sends a ‘check blacklist IMEI’ request to check if an IMEI already exists in blacklist.

URL - http://api.airpush.com/api.php
Supported request methods - GET, POST
Requires Authentication - Yes, API AUTH KEY
Parameters:

Model "app"
Action "check_imei_black"
APIKEY Generated API Key
AppId App id of application give above
IMEI Md5 encrypted IMEI that needs to be checked in blacklist

Response Details - If a given IMEI already exists in blacklist, the server responds back with int value 1, along with the HTTP status code 200 (OK). If IMEI doesn’t exist in blacklist, the server responds back with int value 0, along with the HTTP status code 200 (OK). If parameters are invalid, server will return HTTP status code as 400 and in case of any other errors server will respond back with the specific error code.

Sample Code:

http://api.airpush.com/api.php?model=app&action=check_imei_black&APIKEY=apikey&appId=appid&imei=UserEncryptedIMEI

Remove Blacklist IMEI

Developer sends a ‘remove blacklist IMEI’ request to remove an IMEI from blacklist in Airnow Monetization database. In blacklist mode, if an IMEI is removed from blacklist, it will qualify again to receive push notification ads from Airnow Monetization.

URL - http://api.airpush.com/api.php
Supported request methods - GET, POST
Requires Authentication - Yes, API AUTH KEY
Parameters:

Model "app"
Action "remove_imei_black"
APIKEY Generated API Key
AppId App id of application give above
IMEI Md5 encrypted IMEI that needs to be removed from blacklist

Response Details - Upon successful removal of IMEI from whitelist, the server responds back with int value 1, along with the HTTP status code 200 (Created). If parameters are invalid, server will return HTTP status code as 400 and in case of any other errors server will respond back with the specific error code.

Sample Code:

http://api.airpush.com/api.php?model=app&action=remove_imei_black&APIKEY=apikey&appId=appid&imei=UserEncryptedIMEI

Whitelist Mode:

Add Whitelist IMEI

Developer sends an ‘add whitelist IMEI’ request to add an IMEI to whitelist in Permissions API database. Note: In whitelist mode, only whitelisted IMEIs will qualify to receive push notification ads from Airnow Monetization.

URL - http://api.airpush.com/api.php
Supported request methods - GET, POST
Requires Authentication - Yes, API AUTH KEY
Parameters:

Model "app"
Action "add_imei_white"
APIKEY Generated API Key
AppId App id of application give above
IMEI Md5 encrypted IMEI that needs to be added to a whitelist

Response Details - Upon successful whitelisting of IMEI, the server responds back with int value 1 along with the HTTP status code 200 (Created). If parameters are invalid, server will return HTTP status code as 400 and in case of any other errors server will respond back with the specific error code.

Sample Code:

http://api.airpush.com/api.php?model=app&action=add_imei_white&APIKEY=apikey&appId=appid&imei=UserEncryptedIMEI

Check Whitelist IMEI

Developer sends a ‘check whitelist IMEI’ request to check if an IMEI is already whitelisted in Airnow Monetization database.

URL - http://api.airpush.com/api.php
Supported request methods - GET, POST
Requires Authentication - Yes, API AUTH KEY
Parameters:

Model "app"
Action "check_imei_white"
APIKEY Generated API Key
AppId App id of application give above
IMEI Md5 encrypted IMEI that needs to be checked in whitelist

Response Details - If a given IMEI already exists in whitelist, the server responds back with int value 1, along with the HTTP status code 200 (OK). If IMEI doesn’t exist in whitelist, the server responds back with int value 0, along with the HTTP status code 200 (OK). If parameters are invalid, server will return HTTP status code as 400 and in case of any other errors server will respond back with the specific error code.

Sample Code:

http://api.airpush.com/api.php?model=app&action=check_imei_white&APIKEY=apikey&appId=appid&imei=UserEncryptedIMEI

Remove Whitelist IMEI

Developer sends a ‘remove whitelist IMEI’ request to remove an IMEI from whitelist in Airnow Monetization database. In whitelist mode, if an IMEI is removed from whitelist, it will not qualify to receive push notification ads from Airnow Monetization.

URL - http://api.airpush.com/api.php
Supported request methods - GET, POST
Requires Authentication - Yes, API AUTH KEY
Parameters:

Model "app"
Action "remove_imei_white"
APIKEY Generated API Key
AppId App id of application give above
IMEI Md5 encrypted IMEI that needs to be removed from whitelist

Response Details - Upon successful removal of IMEI from whitelist, the server responds back with int value 1, along with the HTTP status code 200 (Created). If parameters are invalid, server will return HTTP status code as 400 and in case of any other errors server will respond back with the specific error code.

Sample Code:

http://api.airpush.com/api.php?model=app&action=remove_imei_white&APIKEY=apikey&appId=appid&imei=UserEncryptedIMEI
Personal tools
Namespaces

Variants
Actions
Toolbox