-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API for bidder parameters #1309
Comments
Currently no, although this is a great idea! |
Hey @kcramu while there isn't an API, doesn't |
I, too, would like this. My personal use case, is that we build the configuration on the frontend depending on what is available on that page. Would love to be able to get the list of required and optional params from a partner— to see if we actually have that config available. Some sample code that is kinda what I am going for— var bids = [];
var bidders = ["appnexus"];
Object.keys(bidders).forEach(bidder => {
var params = {};
var allParams = true;
var bidderParams = prebidInfoforSlot[bidder] || {};
var defaultBidderParams = prebidSettings.defaultConfig[bidder] || {};
// Allow us to disable a single slot or partner by configuration.
if (bidderParams.disabled || defaultBidderParams.disabled) { return; }
pbjs.bidderParams(bidder).forEach(function(param) {
var value = bidderParams[param] || false;
if (!value) {
value = defaultBidderParams[param] || false;
}
if (!value) {
allParams = false;
} else {
params[param] = value;
}
});
if (!allParams) { return; }
bids.push({ bidder, params });
}); Where I have the variable I dont have on here the difference between required and optional— but I think the general gist is here. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Question
Please suggest how to programmatically pull all bidder parameters?
Description
As a SSP, I want to programmatically add new bidders for my publishers. I want to know if Prebid.js provides an API to pull the list of bidders and bidder parameters.
The text was updated successfully, but these errors were encountered: