Server-To-Server Integration

The MediaGrid server-to-server endpoint supports both Prebid server and custom OpenRTB integrations based on the OpenRTB v2.5 specification. Integrating with either requires that you set up your integration to support the below details.

Endpoints

Ensure you send bid requests to the appropriate endpoint. We strongly encourage all our publishers to use the following region-specific S2S endpoints:

Region Endpoints

Region

Endpoint

US East

https://grid-use.bidswitch.net/sp_bid?sp=prebid

US West

https://grid-usw.bidswitch.net/sp_bid?sp=prebid

EU

https://grid-eu.bidswitch.net/sp_bid?sp=prebid

APAC

https://grid-jp.bidswitch.net/sp_bid?sp=prebid

Note

If you cannot support region specific endpoints, you can use the catch-all https://grid.bidswitch.net/sp_bid?sp=prebid endpoint.

Prerequisites

  • (Required) Before sending requests, make sure ad unit mapping has been set up, see the Getting Started with The MediaGrid section for details.

  • (Recommended) You could set up user matching before you enable production traffic in order to allow for faster scaling of the integration.

User Synching

Please make sure you have set up user matching. To receive the buyeruid from The MediaGrid, sync your users with the check_uuid handler. This handler accepts an encoded redirect URL with the required ${BSW_UUID} and ${COOKIE_AGE} macros, substitutes them with tuuid and c cookies respectively and then redirects to the given URL. If the user is unknown, the macros will be substituted with empty strings. Cookie bounce is enabled on this endpoint. We recommend resyncing users with The MediaGrid once every 30 days.

# Check UUID usage with example encoded URL containing supported macros
https://x.bidswitch.net/check_uuid/http%3A%2F%2Fexample.com%2Fhandler%2F%3Fbidswitch_user_id%3D%0A%20%20%20%20%20%20%24%7BBSW_UUID%7D%26cookie_age%3D%24%7BCOOKIE_AGE%7D%26gdpr%3D1%26consent%3DCOtTt-fOtTt-fD1AAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAI

# Example of an Unencoded URL that you can use as a basis to form yours
https://example.com/handler?gdpr=${GDPR}&gdpr_consent=${GDPR_CONSENT}&us_privacy=${US_PRIVACY}&uid=${BSW_UUID}&cookie_age=${COOKIE_AGE}

Tips

  • The MediaGrid replies with a 204 OK response for no bids.

  • You can use the following ad units for low QPS testing. The MediaGrid will respond with test bids running under a test campaign. Set these in the imp.tagid request field.

    • tagid: "1"; For display

    • tagid: "11"; For video

  • Should you have any questions, please contact us: pubsupport@themediagrid.com