This example shows how to use 51Degrees on-premise device detection in a web context to determine details about a device based on its User-Agent and User-Agent Client Hint HTTP header values.
We demonstrate how to use the web integration feature to:
- Pass the required information from the web context to the pipeline API.
- Populate relevant response headers such as Accept-CH for User-Agent Client Hints
- Acquire and process evidence from client-side JavaScript. This is used to determine iPhone / iPad models.
To run this example, you will need to create a resource key. The resource key is used as shorthand to store the particular set of properties you are interested in as well as any associated license keys that entitle you to increased request limits and/or paid-for properties.
You can create a resource key using the 51Degrees Configurator.
49 To get a resourcekey with the properties used in this example go to https://configure.51degrees.com/GCrtGh1L
53 # Here we add some callback settings for the page to make a request with extra evidence from the client side, in this case the Flask /json route we will make below