Skip to main content

S2S

The LoopMe S2S API end point supports direct integrations with 3rd party servers. The LoopMe ad server supports the following ad formats:

  • Fullscreen video ads
  • Fullscreen rich redia ads
  • 728x90 tablet leaderboard ads
  • 300x250 MPU/MRectangle ads
  • 320x50 banner ads

Ad Request

The LoopMe Ad Request API uses a simple GET request. Example:

    https://loopme.me/api/s2s/ads?appId=d18c430ad2&uid=00000000-0000-0000-0000-000000000000&ip=109.154.5.180&ua=Mozilla%2f5.0+(iPhone%3b+CPU+iPhone+OS+10_0+like+Mac+OS+X)+AppleWebKit%2f536.26+(KHTML%2c+like+Gecko)+Mobile%2f10A5376e&clientid=testclient&dnt=0&bundleid=air.dj.brothersandring.mobile.android.BrothersAndRingGoogle&appname=Brother_and_Ring&sdk=2.3.0&exchange=mopub

Mandatory Parameters

The following parameters should always be included in the ad request URL:

appId - Unique application id/key provided by LoopMe

ua - Device user agent of the device making the ad request

uid - Unique user identifier. E.g. the device identifier (IDFA for IOS or Google Advertiser ID for Android) or any other unique user identifier (e.g web cookie ID)

ip - IP address of the device making the ad request

clientid - Name of the client server. Adding this parameter simplifies account debugging on LoopMe side. (e.g. "fyber")

dnt - "Do not track" setting for user. Set to "1" to disable tracking.

bundleid - App bundle ID on iTunes or Google Playstore. E.g. air.dj.brothersandring.mobile.android.BrothersAndRingGoogle

appname - Name of the app

sdk - Sdk version number used to deliver the ad. Example 2.3.0

exchange - Name of the exchange that is used to display the ad. In case you are only supporting direct traffic, please enter the name of your network. E.g. "admarvel"

Optional Parameters

The following parameters may be included in the ad request URL to improve ad optimization:

app_version - Version of the app, the ad is displayed in. E.g. "3.2.0"

pubname - Name of the publisher of the app

lon - Longitude of the requester. Example: "32.0472364"

lat - Latitude of the requester. Example: "-121.435938"

reward - Denotes if ad spot is a rewarded ad spot. In case of a rewarded ad spot, please set reward to "1"

storeurl - App store URL: https://play.google.com/store/apps/details?id=air.dj.brothersandring.mobile.android.BrothersAndRingGoogle

lng - User's handset language. 2 letter ISO language code.

Ad Response

Successful Response with Ad

In case ads are available, the API will respond with a HTTP 200 response and an JSON body that contains the ad HTML in the "script" element.

    {
"status": "ok",
"ads": {
"type": "MRAIDv1",
"script": "<div id=\"LOOPME_widget\"> <\/div><script data-send-inbox=\"true\" data-cookie=\"test\" data-app-key=\"7f500ed0b3\" data-device-id=\"test\" data-impurl=\"https%3A%2F%2Fn.com\" src=\"https://m.loopme.me/mobile/lm.single.js?_=1422958578\"><\/script><script>lmCampaigns = {\"ads\":[{\"data\":{\"ad_hides\":{\"enabled\":true,\"value\":0},\"click_url\":\"https://looptrk.com/sj/go/r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8\",\"type\":\"HTML\",\"image_url\":\"https://i.loopme.me/6ec59bfa2999a4d4.jpg\",\"share_url\":\"https://looptrk.com/sj/go/r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8\",\"html_src\":\"<div class=\\\"wave\\\"> <\\/div><div class=\\\"LM_html_container\\\"> <div class=\\\"LM_bg\\\"> <div class=\\\"cloud\\\"> <\\/div> <div class=\\\"cloud\\\"> <\\/div> <div class=\\\"wave1\\\"> <\\/div> <div class=\\\"boat\\\"> <\\/div> <div class=\\\"wave2\\\"> <\\/div> <div class=\\\"rain\\\"> <div class=\\\"el\\\"> <\\/div> <\\/div> <div class=\\\"flood_wrapper\\\"> <div class=\\\"wave_flood\\\"> <\\/div> <div class=\\\"flood\\\"> <\\/div> <\\/div> <div class=\\\"logo\\\"> <\\/div> <div class=\\\"download\\\"> <\\/div> <\\/div><\\/div> <div class=\\\"LM_replayAnimation\\\">↻<\\/div><div class=\\\"LM_v3_close\\\"> <\\/div><a href=\\\"https://looptrk.com/sj/go/r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8\\\" target=\\\"_blank\\\" class=\\\"clickable_area\\\"> <\\/a> <a href=\\\"https://looptrk.com/sj/go/r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8\\\" target=\\\"_blank\\\" class=\\\"failClose\\\"> <\\/a><script src=\\\"https://i.loopme.me/html/soda-test/html_loader.js\\\" class=\\\"LM_loader\\\" data-download-button=\\\"PLAY\\\"><\\/script><link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"https://i.loopme.me/html/soda-test/candy_soda_tablet.min.css\\\">\",\"ad_shares\":{\"enabled\":true,\"value\":0},\"ad_likes\":{\"enabled\":true,\"value\":0},\"id\":\"r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8\",\"download_btn_color\":\"#00AF33\",\"delay\":3000},\"beacons\":{\"ad_show\":\"httsp://loopme.me/api/v2/events?et=AD_SHOW&id=r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8\",\"ad_like\":\"https://loopme.me/api/v2/events?et=AD_LIKE&id=r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8\",\"ad_hide\":\"https://loopme.me/api/v2/events?et=AD_HIDE&id=r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8\",\"ad_share\":\"https://loopme.me/api/v2/events?et=AD_SHARE&id=r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8\",\"video_start\":\"https://loopme.me/api/v2/events?et=VIDEO_STARTS&id=r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8\",\"video_time\":\"https://loopme.me/api/v2/events?et=VIDEO_TIMES&id=r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8\",\"video_complete\":\"https://loopme.me/api/v2/events?et=VIDEO_COMPLETES&id=r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8\"}}],\"version\":\"v0.2.366\",\"session\":{\"si\":\"8plhd55j\",\"beacons\":{\"inbox_open\":\"https://loopme.me/api/v2/events?et=INBOX_OPEN&rid=8plhd55j&id=r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8\",\"ad_close\":\"https://loopme.me/api/v2/events?et=AD_CLOSE&rid=8plhd55j\"}}}<\/script>",
"beacons": [
{
"type": "impression",
"url": "https://loopme.me/api/v2/events?et=INBOX_OPEN&rid=8plhd55j&id=r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8"
},
{
"type": "impression",
"url": "https://loopme.me/api/v2/events?et=AD_SHOW&id=r864cdDiVIZ3aRzNbdESSX0FqhqSg5hTKpO90q5i9q8"
}
]
}
}

No-Ad Response

When no ad is available, the no-ad response will be returned.

The no-ad response is a HTTP 200 response with the JSON body below.

    {
"status": "ok",
"ads": [ ],
"version": "x.x.xxxx"
}

Error Responses

In case of API errors, like:

  • Missing IP address in ad request
  • Missing device user agent in ad request
  • Missing device identifier in ad request

the API will respond with a HTTP 404 Not Found response, which includes a JSON body with the error message.

    {
"status": "error",
"errorMessage": "<error message>"
}