Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

Request to AdTech responds with 403 (Forbidden)

Open joyofdata opened this issue 10 years ago • 5 comments

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

joyofdata avatar Mar 31 '16 16:03 joyofdata

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

mkendall07 avatar Mar 31 '16 18:03 mkendall07

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 :)

Deimos01 avatar Apr 01 '16 08:04 Deimos01

@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'

  • once with 'https://secure-ads.pictela.net/rm/marketplace/pubtaglib/0_4_0/pubtaglib_0_4_0.js' (as suggested by https://github.com/prebid/Prebid.js/commit/4277d8baf543d4aecf2110a8d30b544e768a1bc9)
  • and then with (window.location.protocol) + '//aka-cdn.adtech.de/dt/common/DAC.js' (as suggested by you - https://github.com/prebid/Prebid.js/issues/260)

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

joyofdata avatar Apr 01 '16 09:04 joyofdata

@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)```

joyofdata avatar Apr 01 '16 09:04 joyofdata

@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.

mkendall07 avatar Apr 05 '16 13:04 mkendall07