In-house mediation is not publicly available
In-house bidding with Audience Network is currently in Closed Beta and is not publicly available. We'll provide further updates if this changes.
As an alternative, you can access Audience Network Bidding through one of the mediation platforms we partner with.
When you've finished server-to-server bidding integration, you should complete app bidding integration testing on physical devices with production ads. In case you are facing some http-errors or 'no bids', this session will help you troubleshoot your implementation.
In order to debug the bid request, you can take advantage of cURL command, which allows you to send bid request and receive bid response in your terminal.
YOUR_PLACEMENT_ID
with your placement IDYOUR_BUSINESS_ID
with your business IDYOUR_DEVICE_ID
with your device IDYOUR_BIDDER_TOKEN
with your Bidder Token generated from Audience Network SDKYOUR_PLATFORM_ID
with the mediation partner Platform ID (FB App ID).bid_request.json
{ "id": "vwxfKskkMobzQQ1e7M70", "imp": [ { "id": "FB Ad Impression", "tagid": "YOUR_PLACEMENT_ID", "instl": 1, "banner": { "h": 0, "w": 0, "linearity": 0 } } ], "app": { "publisher": { "id": "YOUR_BUSINESS_ID" } }, "device": { "ua": "Dalvik\/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build\/OSM1.180201.000)", "ifa": "YOUR_DEVICE_ID", "dnt": 0, "ip": "125.123.255.123" }, "user": { "buyeruid": "YOUR_BIDDER_TOKEN" }, "regs": { "coppa": 0 }, "at": 1, "tmax": 500, "test": 1, "ext": { "platformid": "YOUR_PLATFORM_ID" } }
Terminal
bid_request.json
by cd ~/{FILE_PATH}
curl -X POST -H "Content-Type: application/json" -d @bid_request.json https://an.facebook.com/placementbid.ortb
{ "id": "Auction ID", "seatbid": [ { "bid": [ { "id": "Bid Response ID", "impid": "FB Ad Impression", "price": 99.99, "adm": "{\"type\":\"ID\",\"bid_id\":\"BID ID\",\"placement_id\":\"Placement ID\",\"resolved_placement_id\":\"Resolved Placement ID\",\"sdk_version\":\"SDK Version\",\"device_id\":\"Device ID\",\"template\":102,\"payload\":null}", "nurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=partner_id&app=app_id&placement=placement_id&auction=auction_id&impression=impression_id&request=request_id&bid=bid_id&ortb_loss_code=0&clearing_price=${AUCTION_PRICE}", "lurl": "https://www.facebook.com/audiencenetwork/nurl/?partner=partner_id&app=app_id&placement=placement_id&auction=auction_id&impression=impression_id&request=request_id&bid=bid_id&ortb_loss_code=${AUCTION_LOSS}&clearing_price=${AUCTION_PRICE}" } ] } ], "bidid": "Bid ID", "cur": "USD" }
x-fb-an-errors
in HTTP response headers when you did not get above bid response.cURL command to display the HTTP response headers.
url -X POST -H "Content-Type: application/json" -v @bid_request.json https://an.facebook.com/placementbid.ortb
... > Content-Type: application/json > * Connection state changed (MAX_CONCURRENT_STREAMS updated)! < HTTP/2 400 < x-fb-an-request-id: fb_an_request_id ... < x-fb-an-errors: Value cannot be null: value given: null ...
Please refer to HTTP Error Description and Resolutions in Bid Request to fix your bid request.
When testing your bidding implementation, you may experience one of several possible error codes when making a bid request. These error codes and resolutions are described below.
Error Message | Description | Resolution |
---|---|---|
Invalid bidder token in user.buyeruid | The bidder token in | How to generate valid bidder token:
|
ipaddress must be a valid IP address | In | Correct Examples:
Incorrect Examples: (Do not truncate your ip)
|
valid placementids are required | In | Please find your Placement ID from your Business Manager. Choose Manage Properties and find Placement ID under Ad Space of Android or iOS platform. |
Publisher ID is not set on the app request. |
| Please find your Publisher ID from your Business Settings. Choose Apps in the left menu and find your App ID as your Publisher ID |
all placementids must be for same appid | As the message indicates, all Audience Network Placement IDs in the bid request should belong to same App ID. | Please check whether all Placement IDs in the bid request belong to same App ID from Business Manager. Choose Manage Properties and find Placement IDs under Ad Space of Android or iOS platform. |
Value does not contain the non-optional and non-nullable shape field | Required values are missed in your bid request. | Required Values:
|
adformats are required, the number of adformats and placementids should be the same | Please provide non-empty and valid adformats. | Supported Ad Formats:
Please check Supported Ad Formats for more information. |
banner, native and video objects are mutually exclusive but one of them is required | For above adformats, there are different objects: | Please refer to above Supported Ad Formats resolutions. |
Error Message | Description | Resolution |
---|---|---|
No app matched for domain and business ID | In case you use Business ID in | If you keep seeing this error, please use app id in |
Application not authorized for app bidding | Application ID in | Please contact us to get your app added to the allow list, or wait for app approval. |
Platform not authorized for app bidding | Platform ID in | Resolutions:
Please contact us to get your app added to the allow list, or wait for app approval. |
unexpected error | Reasons:
| Resolutions:
|
Error Message | Description | Resolution |
---|---|---|
Empty in Error Header of | Reasons:
| Resolutions:
If keep seeing |
x-fb-an-errors
HTTP header to help you understand the cause of an error.com.facebook.ads.BidderTokenProvider.getBidderToken()
on Android and [FBAdSettings bidderToken]
on iOS and sending the returned string into buyeruid
field of the bid request.ifa
field in the bid request (Android -- AdvertisingIdClient.getAdvertisingIdInfo(context).getId()
, iOS -- [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString]
).dnt: 0
(do-not-track) in bid request.