Medipim API V3

Developer documentation

GET /v3/products/embed

Request

Method

GET

URL

https://api.medipim.be/v3/products/embed

Parameters

Response

An HTML page presenting product information.

Signing the URL

If you are embedding this endpoint into a webpage or app, it may not be possible to use HTTP Basic auth. In that case, you can authenticate this request by adding a message authentication code to the URL.

Tip

If you are using the PHP client, you can generate a signed URL using ->createProductEmbedUrl($productId).

Tip

The GET /v3/products/get response includes a signed URL.

Tip

Example code to generate a signed URL manually:

<?php

    $unixTimestamp = time(); // Unix Timestamp
    $productId = 'xxx'; // Product ID
    $apiSecretKey = 'ApikeySecret'; //API key secret;
    $apiKeyId = 'ApiKeyId'; //API key ID
    $message = "embed:" . $productId . ":" . $unixTimestamp;

    $mac = hash_hmac("sha256", $message, $apiSecretKey);

    $query = http_build_query([
        "id" => (string) $productId,
        "t" => $unixTimestamp,
        "key" => (string) $apiKeyId,
        "mac" => $mac,
    ]);

    return "https://" . $this->apiDomain . "/v3/products/embed?" . $query;