This is a campaign recommendation API used to access YouAppi’s video demand portfolio in real time. Publishers using this API are able to display video ads that are the most suitable for their users. YouAppi’s video real-time API is compatible with both client-to-server & server-to-server integrations.
- Request endpoint: https://onlineapi.youappi.com/v/ad?
- Request method: GET
The table below includes all of the fields that are available on the request.
|Parameter||Description||Mandatory||Data Type||Possible Values|
|access_token||The partner’s key used to access the API; provided by YouAppi||Yes||String|
|request_origin||The origin of the request: client or server.||Yes||String||
|app_id||The publisher’s package name/bundle ID/native ID.||Yes||String||284809790|
|publisher_token||A custom ID of the sub-publisher in the publisher’s system||Yes||String||4568|
|ad_unit_id||ID or description of the ad unit or placement||Yes||String||home|
|user_id_type||The device’s advertising ID type – GAID (Google Advertising ID) when the OS is Android or IDFA (ID for Advertisers) when the OS is iOS.||Yes||String||
|user_id||The device’s advertising ID||Yes||String|
|ip||The client’s IP address||Only when request_origin = server||String|
|ua||The client’s user agent string; must be URL-encoded!||Only when request_origin = server||String|
|companion_img_sizes||Additional companion banners of the same app, added to the video ad using the following format: widthxheight, separated by comma. This parameter is required in order to get companion ads.||No||String||320×480|
The response of the API is in XML format using VAST 2.0.
If there are no ads available, the VAST tag will be empty.
The following is a list of potential errors you may encounter in the response.
500: Internal Server Error
This error may indicate a number of unexpected server errors, and can usually be resolved by re-submitting the request.
4xx: Client Error; may include the following:
- Invalid access token
- User ID is missing from request
- Invalid user ID type
- Invalid request origin
- Unsupported device OS/model
The cause for these errors must be corrected before resubmitting the request.
- Please note that our recommendation engine is set to work under the assumption that calls are made in real-time or close to real-time. Caching – if performed – should be short-term for the duration of one active session per user.
- Calls can originate from either the server or the client. If the request is sent from a server, the request_origin field must say “server” and the ip and user_agent fields must be populated with the details of the client.
- To get the best results, please allow 30,000-60,000 impressions for YouAppi’s algorithm to learn your inventory’s DNA.
For additional information and support please contact firstname.lastname@example.org.