/
Integrate a Webhook

Integrate a Webhook

To avoid continually polling the GumGum Contextual Page endpoint for classification responses, clients can create a webhook to listen for results on a GumGum Contextual callback URL.

To integrate with GumGum Contextual, the webhook target server must:

  • Be able to receive HTTPS POST requests over the internet.

  • Respond to GumGum Contextual with an HTTP 2XX status code.

  • Send responses to GumGum Contextual within 5 seconds.

Note: No data is required in webhook responses to GumGum Contextual.

These steps walk through a GumGum Contextual page classification request with webhook integration. 

Step 1 – Expose web service

First, expose your web service, for example:

https://verity-webhook.domain.com/results

Step 2 – Create page classification request 

Create a GumGum Contextual page classification request, for example: 

https://verity-api.gumgum.com/page/classify?pageUrl=https%3A%2F%2Ftest.iab12.com%2F1

Step 3 – Add callbackUrl parameter with webhook address 

Add a callBackUrl parameter with the webhook address to the page request. The webhook URL must support HTTPS and be properly URL-encoded.  For example:

&callBackUrl=https%3A%2F%2Fverity-webhook.domain.com%2Fresults

Step 4 – Submit GET page classification request

Submit the GET request via curl:

GumGum Contextual issues an HTTP Status Code 202 (ACCEPTED) to indicate that the request has been initiated. The status field in the response JSON within the data payload updates to INITIATED.

Note: GumGum Contextual response time SLAs are under development.

Step 5 – GumGum Contextual POSTs response to webhook URL

After successfully processing the request,  GumGum Contextual initiates an HTTPS POST to the webhook URL with the JSON response data.

Step 6 – Webhook target server sends a successful response status code

The webhook target server sends a successful response status code (2XX) within the HTTP connection timeout of 5 seconds.

Related content


The contents of these documents and any attachments contain GumGum, Inc. confidential information and are legally protected from disclosure.