Follow

Server-to-Server HTML API Ad Request

1. Introduction

This document guides you through the integration process of the StartApp server-to-server HTML API. Once integrated, the API enables partners to retrieve ads and embed them into their publishers’ applications and mobile websites. Examples of the various ad requests and responses for iOS, Android and mobile web are included.

2. Important Notes

  1. The API is done via HTTP GET method. The response is returned as a full HTML. It is up to the partner to insert the HTML element to the mobile client webview or HTML website page.
  2. The closure of the ad window MUST be implement by the partner.
  3. Ad request parameters MUST be URL encoded
  4. If the publisher's WebView is using a custom WebViewClient, it should support the Google Play and Apple App Store url schemes.
  5. Access to StartApp’s Server is restricted, partnerId and password (token) shall be provided upon integration request
  6. StartApp’s ad server optimizes the ads it returns according to the parameters in the request and other offline dimensions. Therefore, it is not recommended to store or cache the ads.

If you have any questions, contact us via support@startapp.com.

3. Resource Details

URL: http://s2s.startappnetwork.com/s2s/1.3/htmlads

HTTP Method: GET

API Version: 1.3

Response Format: HTML

4. Required Request Parameters

5. Recommended Request Parameters

6. Optional Request Parameters

7. Response

The response to the HTML ad request is a full HTML element.

 

Request for Android Banner

 

Response

  banner.png

 

Request for iOS Interstitial

 

 

 interstital.png

 

Request for Android Interstitial

8. Implementation

Mobile Web Implementation Steps

  1. Create a new iframe
  2. Load the HTML response to the iframe
  3. Implement the ad closure functionally
Example 1: Using iframe src
<iframe src="data:text/html;charset=utf-8,#EncodedResponse#" width="320" height="480" ></iframe>
Example 2: Using JavaScript & iframe srcdoc
<iframe id=”myiframe” width="320" height="480" ></iframe>
<
script>
document.getElementById('myiframe').srcdoc = startappResponse;
</script>

Mobile Client Implementation Steps (iOS/Android)

  1. Create a new WebView
  2. Enable JavaScript in the WebView
  3. Make sure that the Google Play and Apple App Store url schemas are supported by the WebView (should launch the Google Play/ App Store app)
  4. Load the HTML response into the WebView
  5. Implement the ad closure functionally

9. Creative Types and Dimensions

When calling an interstitial HTML ad, the partner MUST add a clear and visual exit option (the most common way is to place an “X” button on top of the full page ad). Dealing with closing the ad window can be different in: web, android and iOS. For more information, please contact our support.

It is highly recommended to use the following dimensions in the adw and adh parameters for the requested ad type:

10. Content Rating Values

Content rating maturity level of the product. When used, the response ad must be in the same level or lower. For more information on the android content rating, check http://goo.gl/IPKKqw. As for iOS, the ratings are age based. From 4+ for everyone, 9+, 12+ and 17+ for high maturity.

11. Application Category Values

A1 - Books&Reference
A2 - Business 
A3 - Comics 
A4 - Communication 
A5 - Education 
A6 - Entertainment 
A7 - Finance 
A8 - Health&Fitness 
A9 - Libraries&Demo 
A10 - Lifestyle 
A11 - LiveWallpaper 
A12 - Media&Video 
A13 - Medical 
A14 - Music&Audio 
A15 - News&Magazines 
A16 - Personalization 
A17 - Photography 
A18 - Productivity 
A19 - Shopping 
A20 - Social 
A21 - Sports 
A22 - Tools 
A23 - Transportation 
A24 - Travel&Local 
A25 - Weather 
A26 - Widgets 
A27 - Game Action 
A28 - Game adventure 
A29 - Game arcade 
A30 - Game board 
A31 - Game card 
A32 - Game casino 
A33 - Game casual 
A34 - Game educational
A35 - Game family 
A36 - Game wallpaper 
A37 - Game music 
A38 - Game puzzle 
A39 - Game racing 
A40 - Game role playing 
A41 - Game simulation 
A42 - Game sports 
A43 - Game strategy 
A44 - Game trivia 
A45 - Game widgets 
A46 - Game word
I1 - Books
I2 - Business
I3 - Catalogs
I4 - Education
I5 - Entertainment
I6 - Finance
I7 - Food & Drink
I8 - Games
I9 - Health & Fitness
I10 - Lifestyle
I11 - Medical
I12 - Music
I13 - Navigation
I14 - News
I15 - Newsstand
I16 - Photo & Video
I17 - Productivity
I18 - Reference
I19 - Social Networking
I20 - Sports
I21 - Travel
I22 - Utilities
I23 - Weather

 

12. Network Type Values

0 - Unknown
1 - GPRS
2 - EDGE
3 - UMTS
4 - CDMA
5 - EVDO revision 0
6 - EVDO revision A
7 - 1xRTT
8 - HSDPA
9 - HSUPA
10 - HSPA
11 - iDen
12 - EVDO revision B
13 - LTE
14 - eHRPD
15 - HSPA+
16 - WIFI

13. HTTP Status Codes

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments