How to Mock Prebid API Calls?

Introduction

Debugging Prebid API calls can be complex when you need to simulate various scenarios without impacting live traffic. Managing real-time data adds to the challenge, making it hard to test different responses efficiently.

Requestly simplifies this process by allowing you to mock Prebid API calls, enabling smoother testing without disrupting live environments.

Mock Prebid API Call

The Modify API Response Rule in Requestly allows you to modify api responses to return mock bid data instead of actual bids. This is particularly useful for testing and fine-tuning ad configurations in a production environment without affecting live operations.

Or create your own Rule by following the steps below

Here’s how to set up a Modify API Response Rule to mock bid responses for testing:

  1. Open Requestly:Open  Requestly app.
  2. Create a New Rule: Click on New Rule and select Modify API Response Rule.
  3. Enter the Bid Request URL Pattern: Add the URL pattern for the bid request you want to intercept.
  4. Specify the Mock Bid Response: Enter the mock bid data you want to return in place of the actual response.
    • Example Request URL: https://prebid-server.example.com
    • Example Mock Response: { "bids": [{ "id": "mock-bid", "price": 2.5 }] }
  5. Save the Rule: Click Save to create the rule.

Interactive Guide

Check this interactive and easy explanation of how to create Modify Response Rule.

Conclusion

Try this Modify API Response rule to mock Prebid API calls for effective testing in production, enabling precise debugging without affecting live operations. Requestly is trusted by over 200k developers and 1000+ corporations for its efficiency in managing network requests.

Explore More:

Share this article:

Subscribe to our weekly newsletter !

Join 10k developers and QAs to get weekly updates with Requestly's newsletter.​

This article was written by:

Picture of Kanishk Rawat

Kanishk Rawat

Kanishk Rawat, a tech enthusiast since childhood, has mastered programming through dedication. Whether solo or in a team, he thrives on challenges, crafting innovative solutions .

Join 10k developers and get weekly updates with Requestly's newsletter.

Contents