How to Mock Prebid API Calls?

Kanishk Rawat
Learn to mock Prebid API calls with Requestly for seamless testing and debugging in ad tech setups. Step-by-step guide included

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:

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 .

Contents​

Subscribe for latest updates​

Share this article

Related posts