Prebid Server - Java

The Java version of Prebid Server is for those who:
Java Logo

Code Repositories

Installation

See Hosting your own Prebid Server for important architectural considerations, then follow the instructions for Installing PBS-Java.

Quick Start

There are a few test requests in sample/requests that work with prebid-config-file-bidders.yaml and the files in the samples/stored directory.

  1. Follow the instructions in the root-level README.txt file to build the server

  2. Start the server pointing to a config in the sample directory. e.g.

     java -jar target/prebid-server.jar --spring.config.additional-location=sample/prebid-config.yaml
    
  3. Use one of the stored requests in the sample directory with curl:

     cd sample
     curl --header "X-Forwarded-For: 151.101.194.216" -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36' -H 'Referer: https://example.com/demo/' -H "Content-Type: application/json" http://localhost:8080/openrtb2/auction --data @FILENAME
    

    Where FILENAME is one of:

    • rubicon-storedresponse.json - this is a request that calls for a stored-auction-response.
    • appnexus-disabled-gdpr.json - this is a request that actually calls the appnexus endpoint after disabling GDPR by setting regs.ext.gdpr:0
    • pbs-stored-req-test-video.json - this is a stored-request/response chain returning a VAST document

References

See Also