prebid / Prebid.js

Setup and manage header bidding advertising partners without writing code or confusing line items. Prebid.js is open source and free.
https://docs.prebid.org
Apache License 2.0
1.33k stars 2.08k forks source link

Request to AdTech responds with 403 (Forbidden) #290

Closed joyofdata closed 8 years ago

joyofdata commented 8 years ago

Hello!

prebid.js initiates a request to AdTech which looks as follows:

https://adserver.adtechus.com/pubapi/3.0/[placement-ID]/[network-ID]/0/0/ADTECH;cors=yes;cmd=bid;alias=[14 hexadecimal numbers];grp=[integer < 1000];misc=[large integer]

The only parameters set are placement and network and their values are those used in the URL above. So everything seems to be legitimate.

What might be the issue here?

Kind Regards

mkendall07 commented 8 years ago

Hi @joyofdata Can you post your full configuration for AdTech please?

Deimos01 commented 8 years ago

Hi,

Maybe it's linked to my problem here : #260 . If you are using the european Adtech network, you have to change the JS version in the code (US by default).

I hope it could help :)

joyofdata commented 8 years ago

@Deimos01 Thanks for your input. That does not seem to resolve the issue, though. What I did is I took the minified prebid.js and customized it by exchanging the string (window.location.protocol) + '//aka-cdn.adtechus.com/dt/common/DAC.js'

I could confirm that those JS-files where loaded but neither resolved the issue.

joyofdata commented 8 years ago

@mkendall07

I should maybe also mention that the setup is supposed to implement post-bidding. The code which is served by DFP as a third-party creative is as follows:

<script type="text/javascript" src="//acdn.adnxs.com/prebid/prebid.js" async></script>
<script>
  var tagWidth = 300;
  var tagHeight = 250;

  var bids = [
    {
      bidder: 'aol',
      params: {
        placement: '4538',
        network: '5620600'
      }
    }
  ];

  var bidTimeOut = 5000;

  var passbackTagHtml = '<iframe src="#test"></iframe>';

  var pbjs = pbjs || {};
    pbjs.que = pbjs.que || [];

    var doNotChange = 'doNotChange';

    pbjs.que.push(function() {
        console.log("pbjs.que.push worked!");
        var adUnits = [{
            code: doNotChange,
            sizes: [[tagWidth, tagHeight]],
            bids: bids
        }];

        pbjs.addAdUnits(adUnits);

        pbjs.requestBids({
            timeout: bidTimeOut,
            bidsBackHandler: function() {
                var iframe = document.getElementById('postbid_if');
                var iframeDoc = iframe.contentWindow.document;
                var params = pbjs.getAdserverTargetingForAdUnitCode(doNotChange);

                // If any bidders return any creatives
                if(params && params['hb_adid']){
                    pbjs.renderAd(iframeDoc, params['hb_adid']);
                } else {
                    // If no bidder return any creatives,
                    // Passback 3rd party tag in Javascript
                    iframe.width = tagWidth;
                    iframe.height = tagHeight;
                    iframeDoc.write(passbackTagHtml);
                }
            }
        });
    });

    pbjs.que.push(function() {
      console.log("finalized");
      console.log(pbjs);
    });
</script>
<iframe id='postbid_if' FRAMEBORDER="0" SCROLLING="no" MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" LEFTMARGIN="0" ALLOWTRANSPARENCY="true" WIDTH="0" HEIGHT="0"></iframe>

Both pbjs.que.push worked! and finalized are logged in the console. Then I get the error message in question:

DAC.js:3 
GET http://adserver.adtech.de/pubapi/3.0/5620600/4538/0/0/ADTECH;cors=yes;cmd=bid;alias=190ab28c6a7768;grp=416;misc=1459501251922 
403 (Forbidden)```
mkendall07 commented 8 years ago

@joyofdata You may need to contact AOL to enable header bidding on your account. I believe that should resolve the issue. Please open a new thread if you need further assistance.